-
Notifications
You must be signed in to change notification settings - Fork 205
Error Code: 503 [java.lang.IllegalStateException: You have not started an Objectify context. You are probably missing the ObjectifyFilter. If you are not running in the context of an http request, see the ObjectifyService.run() method.] #73
Comments
Hey there, are you using Android Studio to generate this backend? What does your On Tue, Apr 19, 2016 at 5:22 PM, Tom notifications@github.com wrote:
|
Wow, thanks for the super quick response! Yes, I used Android Studio 2.0 to generate the backend using a slightly different GCM tutorial. I can't find the link at the moment, but it implemented GcmSender.java. backend build.gradle:
|
Hi Tom, I think there's a chance you're making an Objectify call outside of the Without the full code it's hard for me to say. I'd need a link to the On Tue, Apr 19, 2016 at 5:34 PM, Tom notifications@github.com wrote:
|
I found the code that breaks it. It's inside appengine-web.xml. The Google/Android/Appengine/Firebase tutorial specifies manual scaling. This breaks this tutorial. Any idea on how to work around this?
"To use Firebase with App Engine, you must use manual scaling. This is because Firebase uses background threads to listen for changes and App Engine only allows long-lived background threads on manually scaled backend instances." So this means I can only use Firebase or GCM? Not both? The full code is here, but all the pertinent files are the same as this tutorial with the exception of adding my app's information (name/api key). |
Another note: When that element is removed, I get a success message on the local instance and am able to receive a push notification on the Android emulator client. When the app is deployed, I don't see any result - no success and no error- if that element is included or removed. No notification is sent to the client. The client does say it has sent the token to the server. I see this in Chrome's console:
The Appengine log only shows a successful GET:
Update: Removing the manual scaling, I can run it fine from http://atrware.appspot.com/, but not from http://www.atrware.com/ (getting that ERR_CONNECTION_CLOSED). What should I change to run it from my domain? |
You should be able to use Firebase and GCM. Your problem is actually It's not my area of expertise but looking at what the filter actually does: On Wed, Apr 20, 2016 at 1:13 AM, Tom notifications@github.com wrote:
|
Pat, thanks for your quick answers. It's too bad there is no clear resolution to this. I think there are multiple "gotchas" I'm running into. In addition to the possible ObjectifyFilter modification, at least one other "gotcha" is that Google Cloud Endpoints doesn't work on custom domains. That should be a note/requirement in the README for this tutorial As for a way forward to close this out, Firebase was important, but not critical to my backend. I'll explore more in a few weeks since there is no clear resolution and I have lots of other work to finish before the end of the semester. I can't spend hours troubleshooting what should be a one line requirement either here, in notes for Objectify, or in notes for GCM. |
Sorry we couldn't more helpful. I am actually not very well versed in On Wed, Apr 20, 2016 at 1:59 PM, Tom notifications@github.com wrote:
|
Leaving this here for posterity... It seems that only when using
Good luck! |
|
After copying all the file contents into my existing backend I receive this error when trying to send a message:
Error Code: 503 [java.lang.IllegalStateException: You have not started an Objectify context. You are probably missing the ObjectifyFilter. If you are not running in the context of an http request, see the ObjectifyService.run() method.]
I have the following in my web.xml:
What could be the issue?
The text was updated successfully, but these errors were encountered: