Firebase Database not working anymore

Hi,

i had a firebase example (from corona) working months ago

now with new updates when you compile to apk and run on phone you get the attached error message

the first screen does not even load and the error message pops out

on simulator the first screen loads normally but as expected buttons do not work because simulator says:

“WARNING: The ‘plugin.firebaseDatabase’ library is not available on this platform.”

those are the first 2 lines in main.lua which are causing the problem as i suppose

local firebaseDatabase = require "plugin.firebaseDatabase" firebaseDatabase.init()

this is the whole code of main.lua

local firebaseDatabase = require "plugin.firebaseDatabase" firebaseDatabase.init() local widget = require("widget") local json = require("json") local bg = display.newRect( display.contentCenterX, display.contentCenterY, display.actualContentWidth, display.actualContentHeight ) bg:setFillColor( 1,.5,0 ) local title = display.newText( {text = "Firebase Database", fontSize = 30} ) title.width, title.height = 300, 168 title.x, title.y = display.contentCenterX, 168\*.5 title:setFillColor(1,0,0) local getButton getButton = widget.newButton( {   x = display.contentCenterX,   y = display.contentCenterY-100,   id = "Get Test Data",   labelColor = { default={ 1, 1, 1 }, over={ 0, 0, 0, 0.5 } },   label = "Get Test Data",   onEvent = function ( e )     if (e.phase == "ended") then       firebaseDatabase.get("Phone\_IDs/Phone\_ID", function (ev)         if(ev.isError) then             native.showAlert( "Could not Get Data", ev.error , {"Ok"} )         else             native.showAlert( "Data received", json.encode( ev.data ) , {"Ok"} )         end       end)     end   end } ) local setButton setButton = widget.newButton( {   x = display.contentCenterX,   y = display.contentCenterY,   id = "Set Hello World",   labelColor = { default={ 1, 1, 1 }, over={ 0, 0, 0, 0.5 } },   label = "Set Hello World",   onEvent = function ( e )     if (e.phase == "ended") then         firebaseDatabase.update("Phone\_IDs/Phone\_ID",{GPS = "زبط"}, function (ev)             if(ev.isError) then                 native.showAlert( "Could not Upload Data", ev.error , {"Ok"} )             else                 native.showAlert( "Data send", "" , {"Ok"} )             end         end        )     end   end } )

what might be the problem

also attached simulator screen

Thanks & Regards,

Tariq

this seems the solution to the problem but i think it is on Corona Engineers Side to Handle

https://stackoverflow.com/questions/37396973/how-to-solve-firebase-api-initialization-failure-android-firebase

The Firebase Database plugin is provided by a third-party community developer. You should reach out to them about issues you’re having with the plugin.

Rob

Thanks Rob

i think i will try to work on firebase using corona directly (if applicable) if it was as easy as using network.request

after all i think it is a web service … if it doesn’t work i will create my own back end database and web services as i always did … firebase simply gives you an opportunity to skip all back end headaches

the problem with android, ios, windows …etc. is that they keep changing technology very quickly … technology changes used to be every 3 years or more … now every few months you might face drastic changes … so i’d rather stick to corona team who would work immediately on major changes as i have fears of relying on third-party community developers :slight_smile: just like what happened in this case

This should be patched, please try rebuilding

Thanks man… just tried it …it worked just fine  emoji_u1f44f.png

 

you saved me

 

I should rely on third-party community developers  :D 

this seems the solution to the problem but i think it is on Corona Engineers Side to Handle

https://stackoverflow.com/questions/37396973/how-to-solve-firebase-api-initialization-failure-android-firebase

The Firebase Database plugin is provided by a third-party community developer. You should reach out to them about issues you’re having with the plugin.

Rob

Thanks Rob

i think i will try to work on firebase using corona directly (if applicable) if it was as easy as using network.request

after all i think it is a web service … if it doesn’t work i will create my own back end database and web services as i always did … firebase simply gives you an opportunity to skip all back end headaches

the problem with android, ios, windows …etc. is that they keep changing technology very quickly … technology changes used to be every 3 years or more … now every few months you might face drastic changes … so i’d rather stick to corona team who would work immediately on major changes as i have fears of relying on third-party community developers :slight_smile: just like what happened in this case

This should be patched, please try rebuilding

Thanks man… just tried it …it worked just fine  emoji_u1f44f.png

 

you saved me

 

I should rely on third-party community developers  :D