I've attempted to follow tutorials for both Xamarin (http://docs.xamarin.com/guides/android/platform_features/maps_and_location/maps/part_2_-_maps_api/), and Google Play (it is in the Google Play Services getting started page on Xamarin Studio) to get a working maps example.
Back in December, a friend of mine used my phone to develop a map app using his own laptop. However when I tried compiling his code on my computer, I was getting the same error below. I don't have another android phone to test with, but I can't figure out why it isn't working. I imagine the error lies within my target sdk, which is 19. The API key I'm using is provided from Google and pasted it in like the tutorials say, so I don't think that's the issue. So the issue must lay within the SDK I have, or my computer. I'm just not sure how to test it or further debug it.
The error being spit out over and over again until I leave the page is this:
[AndroidHttpClient$2] executeRequestSending() director.getClass()=class org.apache.http.impl.client.DefaultRequestDirector [AndroidHttpClient$2] executeRequestSending()#finished <<<<< nafResponseWrapper=NafResponseWrapper [httpResponse=HTTP/1.1 400 Bad Request, usedCipherSuiteAndroidName=TLS_ECDHE_RSA_WITH_RC4_128_SHA] [AndroidHttpClient$2] execute() finalHttpResponse.getStatusLine()=HTTP/1.1 400 Bad Request [AndroidHttpClient$2] execute()#finished
Turns out the package name was wrong when signing up for the API key. The hidden in the flood of messages about the 400 bad request.
Silly mistakes and such. I feel silly for making this post honestly.
Related
We're trying to integrate with Google Pay for Passes to add transit tickets to Google Pay, using C# and the "skinny" flow as described here:
"Skinny" JWT variation
We're also using the C# example as provided here: google-pay/passes-rest-samples
The REST calls for transit all succeed and the JWT token is generated, however when trying to add the ticket to Google Pay by using the link "https://pay.google.com/gp/v/save/{jwt_generated}" it just fails with a generic error saying "Something went wrong. Please try again later.". We've tried by just using the link directly, by adding a JS button on a website and even tried loading from a native android application, they all come back with the same error. When using JS button, the error callback returns "SERVICE_ERROR" with no further details. On google console we can see the transit class status as APPROVED.
Any details on what we might be missing would be helpful as it's not clear where the problem is originating from.
There isn't enough information to help you out here. But the best course of action is to request support with the following URL: https://support.google.com/pay/merchants/contact/instore_merchants
The team should be able to look into your specific issues.
I had same issue using passes-rest-samples.
I've missed changing SERVICE_ACCOUNT_EMAIL_ADDRESS in Config.cs, so resolved it by changing it to right service account.
this.SERVICE_ACCOUNT_EMAIL_ADDRESS = "ServiceAccountEmail#developer.gserviceaccount.com"; // CHANGEME
I'm trying to setup my old ASP.NET MVC app with Xero's latest OAuth 2.0 protocol. As per the documentation, I'm using the official Xero-NetStandard library.
I can successfully redirect the user to Xero's consent page, and also get redirected back to localhost with a valid-looking code as expected. However, problems arise when I try to retrieve the Access Token.
var xeroToken = _xeroClient.RequestAccessTokenAsync( code ).Result;
When this code is executed on my localhost environment, very little seems to happen. The request just gets stuck and won't continue past this point. The only occasional error I see is a 'request timeout' after quite a few minutes.
Please understand I have looked at all the references and examples I can find, but most of them either have specific Dotnet Core stuff, or are completely out of date (the Xero client seems to have changed quite a bit since they were created 5+ months ago).
Maybe I'm going crazy but this was working as expected a couple of months ago when I started work on our new Xero integration, but now I have no clue what's wrong 😢
It looks like that function requires being called in an async fashion:
await client.RequestAccessTokenAsync(code);
https://github.com/XeroAPI/Xero-NetStandard/blob/df9051feee2b49c0cdd3253bb6acafc4491869b5/Xero.NetStandard.OAuth2Client/src/Client/XeroClient.cs#L132
I'm using MVC External Authentication providers for both Google and Facebook. I have easily gotten both working many times before.
For some reason today, on a brand new project (File | New Project | MVC 5 Web App) in VS 2015 - it is the completely default project. The only thing I have done is provide the App Keys and Secrets for both Google and facebook.
Facebook works all the way through, calls back - asks me to register as a new user - and then logs me in as that user.
Google gets all the way to the point where it WOULD call back to the OAuth Callback url - but that never happens, and instead I'm just redirected back to the login page with no further explanation. There are no errors, no messages are logged anywhere that I can find, and no exceptions are thrown.
If instead, I register as a password user, and then try to link the account - I am able to do so without any trouble with facebook. However, again, with the Google external provider, it gets to the point where the OAuth callback uri WOULD Be triggered, but instead, it just take me back to the "/ManageLogins" page with the generic error "An Error has Occurred".
I have enabled every type of exception that I could possible trap - but I get absolutely no feedback from the process except that it didn't work. And since I literally have not yet had a chance to write a single line of code, I'm not sure what else to try.
I have spent almost 6 hours now trying to get this basic identity management part of the project completed - and while it usually only takes 10-15 minutes, I am completely blocked. And since there is so little feedback from the code itself, I'm hoping that someone has run into this before and might be able to help.
Thanks.
Other Things I've tried:
1) it was original http - I thought that might be the problem, so I got an ssl certificate - and have converted it to https. Same problem.
2) I have cleared my cookies, tried incognito, tried in many browsers - always the same result.
3) Original it was a new project in a larger solution - so I have now just created a new web project in it's own solution. Same problem.
4) I have switched to 2 different domains, and tried it from localhost of course.
Running out fo things to try....
EJ
I know its an old thread, but I ran into the exact same issue. You have to make sure that Google+ API is enabled in Google Developers Console.
I've spent 2 days messing around with various Drive API tutorials using a Service Account.
The most recent tutorial i used was this one: https://developers.google.com/drive/delegation
I keep getting this error when trying to upload a file:
ProtocolException was unhandled
Error occurred while sending a direct message or getting the response.
I installed Fiddler and determined that when POST /o/oauth2/token was returning:
{
"error:"invalid_grant"
}
I have already triple+ checked the scope of my application.
What am I doing wrong?
Turns out the time on my server was 5 min fast.
When I corrected the time on the server everything worked.
I believe this was causing some kind of authentication issue because the Google Server time didn't accept the timestamp of the request coming from my server or something along those lines...
(Hope this saves someone some head banging)
Another question from me. This wont be an easy one!
I'm having issues with handling a simple upload.
Pre Requirements to test with:
- No Flash (hijacking)
- Basic upload field usage + form to post
- Max file size is 20MB (web.config maxrequestlength)
- I'm running the web site with the build in IIS development tool in visual studio (i think)
- I'm using a MVC web project
Question: Is it possible to show a nice error message to the user when a file is larger than 20MB? (Without getting the whole file to the server first)
These links helped me the most:
http://www.telerik.com/community/forums/aspnet/upload/maximum-request-length-exceeded.aspx
ASP.NET MVC: Handling upload exceeding maxRequestLength
http://forums.whirlpool.net.au/archive/809909
http://forums.asp.net/t/1106579.aspx/1
Catching "Maximum request length exceeded"
But still i haven't been able to fix the issue. Atm i use the code of the accepted answer of the last link (Catching "Maximum request length exceeded"), but my code crashes when i run the code line below:
this.Server.Transfer("~/error/UploadTooLarge.aspx");
Error message: Error executing child request for ~/error/UploadTooLarge.aspx.
I think i get this message because i'm using VS.NET's build in web server (see: http://forums.asp.net/t/1106579.aspx/1 last post of that page).
I'm affraid i made the whole question a bit hard to read. In short:
How can i show a neat error message when i uploaded file is too large (using S.NET's build in web server)?
If you don't want to send to whole file to the server first, then your only option would be javascript.
The FileReader object would solve that for you
https://developer.mozilla.org/en-US/docs/DOM/FileReader
Problem being it won't work on older browsers.
Now, if older browsers are not a problem for you then you should find plenty of tutorials showing you how to use the FileReader object. With it you can do asynchronous uploads so you even add a nice progress bar considering is fairly large file.