google-app-engine


Firebase access within GAE


It seems that the latest sdk com.google.firebase:firebase-server-sdk:3.0.0 relies on creating threads for most calls, e.g., com.google.firebase.database.FirebaseDatabase.getReference
This is a problem when using GAE since it promptly throws an Exception:
servlet java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThreadGroup")
Are we suppoed to just use the JVM sdk (com.firebase:firebase-client-jvm) instead?
The instructions aren't so clear and it seems like the legacy website is the only one where we can get the secret. The new website gives us the .json file.
Has anyone had any success with using the new v3 version with GAE?
Yes. Just tested.
As with the 2.x SDKs, you can work around the threading limitation by using manual scaling.
While the Cloud guide on using Firebase with GAE is a bit outdated, the section on manual scaling should still be useful to help you through this.
More on ThreadManager here.
I was experiencing the same problem and discovered the cause in this blog thread.
When adding dependences, I had included appengine-java-sdk but overlooked appengine-api-1.0-sdk. Adding it eliminated the exception. The full dependencies block is:
dependencies {
appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.48'
compile 'javax.servlet:servlet-api:2.5'
compile 'com.google.firebase:firebase-server-sdk:3.0.3'
compile 'com.google.appengine:appengine-api-1.0-sdk:1.9.48'
}
Include the JSON file in the "Resource Files" of appengine-web.xml.
Example:
<resource-files>
<include path="/**.xml" />
<exclude path="/feeds/**.xml" />
</resource-files>
See the link https://cloud.google.com/appengine/docs/java/config/appref#resource_files .
"The files that listed in the element are accessible by the application code using the filesystem. These files are stored on the application servers with the app as opposed to how static files are stored and served.".

Related Links

Android Studio not recognizing gradle 2.10
How to solving ImportError: No module named scraping
Securely providing external service credentials to Google App Engine?
Arduino make GET request to Google app engine
Is my GAE Search corrupt?
Jinja2 reuse templates for new and edit
Using QuerySplitter in Google Datastore to load chunks of a known size
Can you explain what the app engine context interface is?
How to ensure that my entity will never be an orphan?
GAE custom Go runtime - internal.flushLog error
Google Datastore - Search Optimization Technique
Can't lease tasks by service account
Why custom domain “myapp.com” which replaces “myapp.appspot.com” took so long to load when comparing to “myapp.appspot.com”?
Does objectify have a get_or_insert equivalent
Custom domain from google not routing to App engine site
Unable to stop or delete datalabs environment on Google Cloud Platform

Categories

HOME
django
adal
dns
jwplayer
gembox-spreadsheet
pearson-correlation
bing-maps
heap
resultset
datastage
php-5.6
endpoint
pybossa
comsol
symmetricds
google-picker
google-container-registry
swagger-2.0
symbols
gmock
sinch
cppreference
sqlpackage
calculation
left-join
database-comparison
deltaspike
card.io
activexobject
pdw-file-browser
browser-extension
searchkit
python-pptx
salesforce-communities
z-notation
attributeerror
sharp-snmp
glm-math
congestion-control
apollostack
linter
openrasta
jquery-ui-draggable
dt
mouseleave
rmongo
stripe-connect
docpad
custom-lists
resourcemanager
jboss-tools
dup
android-wake-lock
invoke-sqlcmd
design-principles
crouton-os
rewrite
roadkill-wiki
.bash-profile
uncompress
fail2ban
jquery-forms-plugin
iso-prolog
genymotion-call
universal-image-loader
gii
kissfft
tinyxml
dct
dtmf
ebay-lms
modular
android-icons
extconf.rb
jdb
kqueue
fitbounds
wiimote
globals
easyb
nstokenfield
cfwindow
filesystemobject
feasibility
complex-event-processing
lemmatization
xslcompiledtransform
mathematical-typesetting

Resources

Encrypt Message