Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4110392
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:55:41+00:00 2026-05-20T21:55:41+00:00

I open a channel during the app initialization through a series of ajax calls:

  • 0

I open a channel during the app initialization through a series of ajax calls:

getToken = function () {
    xhr = new XMLHttpRequest();
    xhr.open("GET", "/game?action=getChannelToken", true);
    xhr.send(null);
    xhr.onreadystatechange = function() { 
        if (this.readyState == 4 && this.status==200) {
            connect(xhr.responseText);
        }
    };
};

Servlet:

ChannelService channelService = ChannelServiceFactory.getChannelService();
channelToken = channelService.createChannel(uid);

The token is then returned to the javascript for:

connect = function (token) {
//  alert ("connect");
    var channel = new goog.appengine.Channel(token);
    var socket = channel.open();
    socket.onopen = onOpened;
    socket.onmessage = onMessage;
    socket.onerror = onError;
    socket.onclose = onClose;
};

I’m getting this error:

WARNING: /_ah/channel/dev
com.google.appengine.api.channel.dev.LocalChannelFailureException:
Channel for application key null not
found.

The channel creation part is very simple, so I do not understand where is the problem.
System.out.println (channelToken); returns something like

channel–rrmk8i-100002139544068

(100002139544068 is the uid I used to create the channel), so it seems to return a real token. Moreover, channelService.sendMessage(msg); (using the same uid as before), sends the message without any problem.

Does anyone have any idea why this is happening?
I’m using eclipse 3.5.2, GAE/J 1.4.2 and ubuntu 10.10

Googling for that exception I found only one discussion here:
http://groups.google.com/group/google-appengine-java/browse_thread/thread/19f250b1ff0e4342

but changing var channel = new goog.appengine.Channel(token); to var channel = new goog.appengine.Channel(uid); did not solve anything (and, from what I understand, it shouldn’t)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T21:55:42+00:00Added an answer on May 20, 2026 at 9:55 pm

    I can think of two reasons this could be happening:

    1. You’re restarting the dev_appserver.py while your client is still running. Because the client will be polling with an “old” token that the dev_appserver doesn’t know about, it will throw this error. If this is the case, just refresh your client page after restarting the dev_appserver (or otherwise force it to request a new token).

    2. connect() is being called with an invalid token. It sounds like you’ve ruled that out but if the above isn’t true it might be worth double-checking.

    You can see what token the client is polling with you can open up Firebug or the Chrome dev console and look for requests to a path like this:

    http://localhost:8080/_ah/channel/dev?command=poll&channel=channel-1503856530-alpha-token&client=1

    The channel-1503856530-alpha-token part of that URL is the token passed to “new goog.appengine.Channel()“.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Over Christmas I implemented some code to open a channel to my App Engine
I am trying to write a simple program to open a socket channel to
I want to access from my application to youtube to open a channel. I've
I am trying to get the channel api working. This is what I have
So this code runs in an asp.net app on Linux. The code calls one
Mailing lists are preffered communication channel for many open source products. But what is
Is it OK to leave a Go channel open forever (never close the channel)
I just started learning HTML5 canvas and Google App Engine's Channel API. I build
1st of all, sorry for using that channel, but there's no other open communication
On the billing page, I see that it costs $0.00001 to 'open' a channel.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.