Unable to upload files to AWS S3 buckets using CORS - ruby

I was just trying out the example which is specified in this blog, but I am getting this error "Could not contact signing script. Status = 404". I followed all the steps specified in the blog and also carefully changed the CORS configuration in AWS management Console too. I am not able to figure out the problem. Kindly help me out.
Here is the blog link http://www.ioncannon.net/programming/1539/direct-browser-uploading-amazon-s3-cors-fileapi-xhr2-and-signed-puts/

I faced the same problem you did trying to follow the example in this blog post. I wrote an article showing everything I had to do to make it work for me.
https://blog.pjam.me/posts/direct-upload-to-s3/
Hope it'll work for you.

Related

Error getting valid response from API. Check log file for error details

I cant seem to find the error log of authorize.net api.
I have Laravel application which uses "authorizenet/authorizenet" package and the code where I try to create a customer profile, I get following error:
"Error getting valid response from API. Check log file for error details"
Can anyone tell me whereto find these logs? and what it's name?
I tried in /var/logs folder but i cant seem to find it.
if someone else has this issue, here is the solution.
The authorize.net has changed their endpoints from https://api.authorize.net to https://api2.authorize.net which is one of the possible reasons that you might get this error.
So if you are hardcoding these endpoints in your code then update it to the new one or if you are using library constant for it, same as me:
\net\authorize\api\constants\ANetEnvironment::SANDBOX
\net\authorize\api\constants\ANetEnvironment::PRODUCTION
Then simply update your library by running:
composer update authorizenet/authorizenet
This is how I resolved it and it seems to be the best way so far because it will update their library to take everything up to date if they have changes something else and you started experiencing this issue.
I hope it helps

Hyperledger-Composer REST Authentication

Request assistance with hyperledger composer. I have created a network and web app around the REST API that was built with the composer-rest-server. I am able to add participants, assets and execute transaction with the default settings. I am now trying to add authentication to the REST server as well as add identities to new participants. However I got stuck. I have reviewed the information at
https://hyperledger.github.io/composer/integrating/enabling-rest-authentication.html
But I'm not sure where I should place the export COMPOSER_PROVIDERS='{.... information to continue the setup.
Any assistance, tips and tricks are much appreciated.
Ok so I figured it out. The problem was that I was running off an older version of composer-rest-server.
I installed the developer tool back in Sep 17 and did the tutorial soon after. I tried the tutorial again and noticed that the deployment command was different and it would not let me deploy my network.
So I updated the composer-rest-server and component cli and it deployed fine. I then followed the steps on the authentication webpage that I referenced above and it worked as intended. I deployed my personal network with the new command and it worked as intended.
Lesson learned this stuff is still being updated and I should be more aware on what changes. Thank you very much #nilakantha singh deo
Open a new terminal from inside the project folder.Format your COMPOSER_PROVIDERS in notepad according to the document you mentioned and copy the whole message and paste it in the terminal.Then you can echo it (see it) by typing the following.
echo $COMPOSER_PROVIDERS
It should ideally return the same json file.
Then make sure that the compopser-rest-server is running with multiuser mode and authentication enabled in the same terminal where you echoed and saw the COMPOSER_PROVIDERS.
In browser now type
localhost:3000/auth/github
It should ask for authentication .Rest of the steps are listed in the document you mentioned.
Cheers!

Error: invalid_scope - This app hasn't been verified to access

Has anyone experienced this error before? I have been researching, testing, and banging my head to get this error to go away but nothing seems to work.
This is a similar question to the following posts:
Error: invalid_scope google read contact
Google Api:: Error: invalid_scope
403 error when calling Google People API
Unfortunately, these posts never were resolved or aren't helpful.
What is puzzling is, i'm following the examples listed here: https://developers.google.com/api-client-library/javascript/samples/samples. Along with testing the ONLY the scopes I need here: https://developers.google.com/people/api/rest/v1/people/get.
However, I cannot seem to get past the popup screen that states i'm passing an invalid scope.
FYI, I have the API Console setup to use Google People API, Google+, and Google Contacts. I'm using my client id and api key in the "gapi.auth2.init" config call.
Any insight would be super helpful! Thank you for your time and response.
This is a scope issue because my web application has not been verified by Google for OAuth.
As a developer you can test the source by entering your test account(s) here: https://groups.google.com/forum/#!forum/risky-access-by-unreviewed-apps
To get approval you must submit the form here: https://support.google.com/code/contact/oauth_app_verification
after googling some time I've come across this question and the list of scopes of google:
https://developers.google.com/identity/protocols/googlescopes
Just in case this helps.
I copied and paste code from google developers example page
Search list
and that example didn't work for me. I got the same error about invalid scope...
Solution was to change below line:
private static final Collection<String> SCOPES = Arrays.asList("YouTubeScopes.https://www.googleapis.com/auth/youtube.force-ssl YouTubeScopes.https://www.googleapis.com/auth/youtubepartner");
with following line:
private static final Collection<String> SCOPES = Arrays.asList("https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtubepartner");
Basically I just get rid of "YouTubeScopes" prefix and it has started to work.

Sonar rest API insufficient privileges

I can't access most of the Sonar API, for example
localhost:9000/api/tests/show?key=htmlparser:/src/test/java/HtmlParserTest.java
or see api/sources/scm. api/server/system and some other general stuff works but nothing where I actually see the code.
I always get a
{"errors":[{"msg":"Insufficient privileges"}]}
I set the project permissions to let anyone see source code & browse the porject, I tried it with Postman, a Java HttpRequest, the command line ...
curl -u admin:admin localhost:9000/api/tests/show?key=htmlparser:/src/test/java/HtmlParserTest.java
I checked with SonarQube 5.1 and 4.5.1. I've found a posts with the same issue but have yet to find a fix. Does anyone have a solution idea?
Thanks for your help
SOLUTION
It was a syntax error (even though the message said Insufficient privileges). The correct call would be:
localhost:9000/api/tests/show?key=htmlparser:htmlparser:src/test/java/HtmlParserTest.java
If you are not sure what goes before the "src/..." don't worry. You can get it by calling api/projects/index and looking at the attribute named "k".

How to set up gist to work with an existing token?

I've installed gist Ruby gem. However, I'm having trouble setting up my gist to work with an existing Github account and taken. I've read the instructions in here. However, I'm lost on the next steps I should try to get the authentication working despite following the instructions.
------ Update--------------------------
Found this issue to be open in its Github page: https://github.com/defunkt/gist/issues
Not much I can do at this point.
Thanks in advance for your insights!
You should use your github password, not token: https://github.com/defunkt/gist#authentication

Resources