App is not authorized to scopes after installing via chrome web store - google-apps-marketplace

We are in the process of creating our new app for v2 of the apps marketplace. Recently we have run into quite a major issue and we are having a lot of trouble resolving it.
We are testing the workflow where a domain admin installs via the chrome webstore listing. The actual installation of the app works, insofar as the app is installed on the domain and the scopes appear to be granted when looking at the "Manage API client access" section in the domain admin panel (http://i.stack.imgur.com/a63nv.png).
However, when we attempt to use the service account to get calendar or contacts info, we are getting "Requested client not authorized" errors.
{
"error" : "access_denied",
"error_description" : "Requested client not authorized."
}
However, if we manually add our service account + scopes to the domain in question, then accessing the data programmatically works fine (http://i.stack.imgur.com/g6pRg.png).
So, clearly we are missing something here, with how installing a marketplace app via the chrome web store is supposed to work.
Other things to note:
Chrome webstore listing is marked as unlisted.
New marketplace app is not approved (obviously) as the tester received this specific error when attempting to install the marketplace app.

We got it figured out. The issue was in how we declared our contacts API scope in the marketplace sdk setup screen.
In the marketplace setup screen, we declared using the contacts scope without a trailing slash ("https://www.google.com/m8/feeds").
However in our app, we were sending oauth requests for the calendar feed with the slash at the end. ("https://www.google.com/m8/feeds/"). This mismatch caused the whole request to fail with the error message above.
If anyone runs into this and is baffled at why their service account requests are failing, make sure you are consistent with your slashes at the end!
I would suggest to Google that you should update the marketplace sdk screen to also be consistent and reject scopes that do not have a slash at the end. That would have saved us days of frustration.

Related

Gsuite Marketplace publish process: 404 error

Looking into building some Gsuite Marketplace apps, but we have having issues at the publish time already.
Publishing an app following these steps makes the app to be accessible from the Chrome Marketplace.
(e.g. https://chrome.google.com/webstore/detail/qwertzuiopasdfghjkl/publish-accepted)
Using Chrome web store app link (e.g. https://chrome.google.com/webstore/detail/app-name/qwertzuiopasdfghjkl)
redirects to a Gsuite link (e.g. https://gsuite.google.com/marketplace/app/qwertzuiopasdfghjkl?pann=cwsdp&hl=en-US) but brings a 404 page.
Waiting seems to do the job (url works after a couple of days - approval)
Changing app type from "Private" to "Unlisted" break it completely; even waiting up to a week, the link never works again.
My questions are:
How do you switch between "Visibility options" without breaking your
app?
How do you guys deal with updating publishing apps on Gsuite
Marketplace and keep it working?
Cheers!
Every new update requires a new installation. So everytime you make changes whether feature or visibility settings, treat it as if you were uploading a new app.
If you change the visibility, it will undergo a review process as if it were a new app.
Users who have already installed your app will still be able to use it.

Can't publish a Hangout app (extension)

I've created a Google Hangout extension app, tested it works privately etc and now I'm trying to publish it. I have followed the instructions here:
https://developers.google.com/+/hangouts/publishing
I've filled in the forms correctly, created the O-Auth client ID, filled out the consent form etc. When I tick the Make this application public tickbox and try to save, a server error message pops up along the lines of:
Server Error
Whoops! Our bad.
Please try again. If the problem persists, please let us know using the "Send feedback" link below. Thanks!
Tracking Number: XXXXXXXXXXXXXXXXXXXXXXXXX
[Send feedback]
I've checked the Chrome console - the request gets a 500 error and in the JSON response I can see:
{"message":"Developer not registered with CWS."}
I have paid the $5 one-off developer fee on the Chrome Web Store and I am the Hangout project owner. I'm not sure what I'm missing here. I need to get this published in the next 24 hours...
Any useful insights? Is there any official support forum for Google+ platform developers?
UPDATE
I was using a Google Apps account before so I've paid the developer fee on a personal account to verify me on CWS, made this account owner of the Hangout project and I still get the same message response.
I believe then that it's basically just broken. Thanks Google.

"backendError" when migrating Google marketplace App from v1 to v2 using UpgradeableApp API

We're trying to migrate an app from v1 (using openid) to v2 (Oauth 2.0) in the Google Apps Marketplace.
The old app is published in the old marketplace.
The new app is published in the Chrome Webstore.
We have associated the new app to the old app, using the webstore App id.
As a result, the install button in the old marketplace now says "Install App" (as opposed to the old "Add it now"). It works fine.
However we're also trying to migrate existing domains from the old app to the new app.
We are using the UpgradeableApp API, using an HTTP PUT request to this URL:
https://www.googleapis.com/appsmarket/v2/upgradableApp/1234%3A1234512345/somelongappid/sampledomain.com
note we url-encoded the : in the old listing id with %3A, but even leaving the : the result is the same.
And signing it using 2-legged OAuth, using client Id and client secret of the old app, calculating and the adding the "Authorization" header to the request.
When we send the request, however, this is what we get back:
{"error":{"errors":[{"domain":"global","reason":"backendError","message":"Backend Error"}],"code":500,"message":"Backend Error"}}
with an HTTP status code 500 (internal server error).
This does not seem to be an authentication error message, but it is not very clear what is causing the error... Something wrong on our side? Something temporarily wrong on Google's side (that is what I would assume, from "Backend Error")?
Has anyone encountered this cryptic error message before, while using this API?
We can provide a full network trace (with the real listing id, app id and domain names) as a private message, if necessary.

Google Apps Marketplace V1 domain authorization broken

As of last night, our app is no longer authorized to access Google API's for new domains that install it.
From our end, we are receiving the licensing notifications when a domain installs our app, and we can also retrieve notifications from the FeedServerClient to get the installing admin's email address, but that's the only thing that is still working.
No UserProvisioning API's nor GoogleApps data-level API's can be run without a 401 error.
We did make a change to the "Full Overview" text field in our GAMv1 entry last night, but we did not change the other parts of the manifest in any way, nor did we change any scopes.
Domains that installed yesterday (or before "2014-06-09 23:00:00 GMT" to put a closer timeline on it) are working fine.

Javascript Error on Facebook Login using Chrome - Unsafe JavaScript attempt to access frame with URL. Domains, protocols and ports must match

I have been running the facebook c# sdk successfully for a good year or more, and it stopped working early december. This was due to the API changes at Facebook, and an informative error told me that i needed to use some new parameters in my calls (specifically oAuth: true )
I read up on the changes, and updated the sdk via nuget, which is now running on version 5.4.1.0 of Facebook.JavascriptMvcWebsite and FacebookWebMvc and the other required libraries that make up the facebook c# sdk.
Now, when clicking the facebook login button i get a different error...
Unsafe JavaScript attempt to access frame with URL https://www.facebook.com/login.php?api_key=251066398241630&skip_api_login=1&display=popup&cancel_url=https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%3Fversion%3D3%26error_reason%3Duser_denied%26error%3Daccess_denied%26error_description%3DThe%2Buser%2Bdenied%2Byour%2Brequest.%23cb%3Df3570617%26origin%3Dhttp%253A%252F%252Fgem.local%252Ffbb4f09e%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df1c822218c&fbconnect=1&next=https%3A%2F%2Fwww.facebook.com%2Fdialog%2Fpermissions.request%3F_path%3Dpermissions.request%26app_id%3D251066398241630%26redirect_uri%3Dhttps%253A%252F%252Fs-static.ak.fbcdn.net%252Fconnect%252Fxd_proxy.php%253Fversion%253D3%2523cb%253Df3570617%2526origin%253Dhttp%25253A%25252F%25252Fgem.local%25252Ffbb4f09e%2526relation%253Dopener%2526transport%253Dpostmessage%2526frame%253Df1c822218c%26sdk%3Djoey%26display%3Dpopup%26response_type%3Dtoken%252Csigned_request%26fbconnect%3D1%26from_login%3D1&rcount=1 from frame with URL http://gem.local/Account/LogOn. Domains, protocols and ports must match.
The console window in Chrome then racks up about 5 of these errors a second, all coming from the facebook login dialog.
I have tried modifying the fbChannel.ashx file to explicity use http:// instead of just // (which respects the current protocol) and also have done the same in FacebookInit.cshtml, but none of this is making any difference.
I also modified my facebook app settings to allow deprecated code...
What am i missing here? I understand why the browser is having a fit over cross domain access, but what is causing this? Have facebook completely switched to https? can i still use facebook logins over http?
I have a test site up where you can see the error in action
Any help appreciated.
Clear the App Domain Field (leave it blank) in Facebook Application --> Basic Info

Resources