Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I get empty ChannelId using Push Messaging #106

Closed
John05 opened this issue May 29, 2013 · 5 comments
Closed

I get empty ChannelId using Push Messaging #106

John05 opened this issue May 29, 2013 · 5 comments

Comments

@John05
Copy link

John05 commented May 29, 2013

I have two problems, I am trying to use the sample https://github.com/GoogleChrome/chrome-app-samples/tree/master/push-messaging-roundtrip-sample, in this example is used the function chrome.pushMessaging.getChannelId.

For using this option it is mandatory to sign in to Chrome or Chromium browser, originally I could not sign in with the mail of my company, example@sanmina.com, after an update of Chrome and Chromium the problem was solved.

The problem right now is that if I sign in with my gmail account I can obtain the ChannelId without problems, but if I sign in with my sanmina account I dont get channel, so I imagine the problem is related with the managment of my company in the policies but I am not sure, I hope somebody could have a more clear idea, thanks in advance.

Like additional information, in Chromium I can not get the ChannelId even with my gmail account, I am using archlinux.

@petewil-G
Copy link
Contributor

Yes, you do have to be signed into the browser for this to work, and
signing into your company is not the same as signing into the browser, as
ATWilson already explained. on the chromium-dev group.

I have definitely seen the GetChannelId work when signed into chromium, it
is surprising that did not work for you, can you please give me more
details? Perhaps you could show me the code making the call and the error
return value that you got.

On Wed, May 29, 2013 at 10:12 AM, John05 notifications@github.com wrote:

I have two problems, I am trying to use the sample
https://github.com/GoogleChrome/chrome-app-samples/tree/master/push-messaging-roundtrip-sample,
in this example is used the function chrome.pushMessaging.getChannelId.

For using this option it is mandatory to sign in to Chrome or Chromium
browser, originally I could not sign in with the mail of my company,
example@sanmina.com, after an update of Chrome and Chromium the problem
was solved.

The problem right now is that if I sign in with my account of gmail I can
obtain the ChannelId without problems, but if I sign in with mmy account of
sanmina I dont get channel, so I imagine the problem is related with the
managment of my company in the policies but I am not sure, I hope somebody
could have a more clear idea, thanks in advance.

Like additional information, in Chromium I can not get the ChannelId even
with my gmail account, I am using archlinux.


Reply to this email directly or view it on GitHubhttps://github.com//issues/106
.

@John05
Copy link
Author

John05 commented May 29, 2013

Well, the line of code that makes the call to get the Channel is chrome.pushMessaging.getChannelId(true, getChannelIdCallback), when I call this function I suppose that the API makes the process to review if the user is logged in the browser, if not, then start the process to sign in. If the user is logged, then in the function getChannelIdCallback I get a variable with details that the API returns, in this details comes the ChannelId, I don't have error, only try to print in the console detail.channelId, but I have this field empty, so I can not understand why with my gmail account in Chrome is the only way to get the Channel, because in Chromium no work neither gmail nor sanmina account.
I have used this example https://github.com/GoogleChrome/chrome-app-samples/tree/master/push-messaging-roundtrip-sample and this other https://github.com/GoogleChrome/chrome-app-samples/tree/master/push-sample-app, the same result with both.

By the way, could give me the link when ATWilson refers to the differences between sign in to the company and the browser please?

Thank you for your time, I hope you can help me.

@petewil-G
Copy link
Contributor

https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/cSTjjU3SXgA
is
the link where ATWilson (Drew) discusses your problem.

It sounds like getChannelId is failing for you with both your gmail and
sanmina accounts in chromium, but succeeding for your gmail account in
chrome. What version of chromium are you running?

I have definitely seen the call succeed in chromium when logged in with a
gmail account, so I know that the scenario works. The question here is
"why isn't it working for you?" The most common error is an access denied
error for not being logged in to chrome sync.

If you are getting back an empty channel ID, there is an underlying HTTP
call sent to chrome with the actual error. Are you able to use either
wireshark or fiddler to look at the HTTP error being returned from Google?
If so, we may be able to find out what the error is.

On Wed, May 29, 2013 at 1:20 PM, John05 notifications@github.com wrote:

Well, the line of code that makes the call to get the Channel is
chrome.pushMessaging.getChannelId(true, getChannelIdCallback), when I call
this function I suppose that the API makes the process to review if the
user is logged in the browser, if not, then start the process to sign in.
If the user is logged, then in the function getChannelIdCallback I get a
variable with details that the API returns, in this details comes the
ChannelId, I don't have error, only try to print in the console
detail.channelId, but I have this field empty, so I can not understand why
with my gmail account in Chrome is the only way to get the Channel, because
in Chromium no work neither gmail nor sanmina account.
I have used this example
https://github.com/GoogleChrome/chrome-app-samples/tree/master/push-messaging-roundtrip-sampleand this other
https://github.com/GoogleChrome/chrome-app-samples/tree/master/push-sample-app,
the same result with both.

By the way, could give me the link when ATWilson refers to the differences
between sign in to the company and the browser please?

Thank you for your time, I hope you can help me.


Reply to this email directly or view it on GitHubhttps://github.com//issues/106#issuecomment-18643210
.

@John05
Copy link
Author

John05 commented May 31, 2013

Actually I can get the Channel Id in Chromium with my gmail account, the problem persists with my sanmina account, the problem for Chormium was that for Arch Linux the API keys used in Google Cloud Messaging were not enabled, I contacted to the package mantainer of Chromium in Arch and he enabled that option, the other problem still persists, I don't know exactly what can be the problem or who could help me, if you know where can I start you are welcome, I am going to keep the search.

@scheib
Copy link
Contributor

scheib commented May 30, 2014

closing old issues.

@scheib scheib closed this as completed May 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants