Firebase Invites error - "could not show pop up:3"

When attempting to send an invite, I receive the error above.  I spoke to Scott H about this and he suggested I confirm that my SHA1 and SHA256 fingerprints are in the Firebase console; they are.  My google-services.json file is up-to-date and everything is correct in my build settings.  

This is for Android only, so I’m not using the Google Sign-In plugin.  adb and simulator builds don’t reveal any additional information.

Samsung Galaxy S6

Android v. 7

Version 3.0.0

Build: 2017.3119

My [abridged] code from Main.lua is below. I’ve tried the code directly from Scott’s example and receive the same error.

<lua>

local glo = require (“globals”)

local json = require( “json” )

– FIREBASE INVITES

firebaseInvites = require ( “plugin.firebaseInvites” )

firebaseInvites.init()

– SHARE BUTTON

shareButton = widget.newButton( {

x = glo.screenWidth - 60,

y = glo.screenTopSB + 20,

id = “shareButton”,

defaultFile = “images/shareIcon.png”,

onEvent = function ( e )

     if (e.phase == “ended”) then        

local message = “My custom message”

local title = “My custom title”

local deepLink = nil

local callToActionText = “Click Here to Get It”

customImage = "http://54.213.63.96/AppIcon_600_600.png"

firebaseInvites.show(message, title, deepLink, callToActionText, customImage, function ( ev )

if (ev.isError == true) then

native.showAlert(“Invites error”, json.encode(ev), {“Ok”})

else

local inviteId = event.data.inviteId

print ("INVITE ID ****** " … inviteId)

end

end)

        end

    end

} )

</lua>

Firebase invites sdk does not give good error messages. Error code 3 is related to sha1 and sha256 fingerprints not being setup correctly. If you google “firebase invites error 3 android” you will see the problem is related sha1. I wish firebase did not require this but it does.

Both SHA fingerprints were in place.  To be sure they were from the right keystore, I delete both of them from the FB console, ran keytool against my production keystore, and added them to the Firebase console. I rebuilt the app in simulator and installed it on my phone. I’m still getting the same error. 

Going through this exercise did make me realize that this error only showed up after I stopped using the debug keystore. 

The error went away after updating my google-services.json file.  I received the invitation, but the install link produces a 404.  Will [can] this work with an Alpha release?

As mentioned above, I receive invitations; however, using the same code as above, an invitation ID is never returned.  Am I missing something?

It is

event.invitationIds

Thanks Scott. That got me to the next step. Now I am confused as to how to retrieve the invitation ID from the runtime event after the app is installed. I’m using the code below to examine the event contents, but I never see a “firebaseInvites” key.

Sorry for the newb questions…

<lua>

local function DeepPrint (e)

if type(e) == “table” then

for k,v in pairs(e) do

print(k)

DeepPrint(v)

end

else

print(e)

end

end


– SYSTEM EVENTS LISTENER


local function onSystemEvent( event )

DeepPrint(event)

end

Runtime:addEventListener( “system”, onSystemEvent )

</lua>

Runtime:addEventListener( "firebaseInvites", function (e) DeepPrint(e) end )

Ah, nice. Thank you sir

It’s me again…  At what point should this listener be firing?  I’ve captured the invite id’s from the sender and saved them in my database. Then I used the invitation link another device, performed the install from the Play store, and ran the application.  I see everything happening in adb, except for this.  No errors.

Runtime:addEventListener( “firebaseInvites”, function (e)

print("**** LOOKING FOR INVITES **** ")

– glo.DeepPrint(e)

end )

Are you put the runtime listener in main.lua?

Yes, near the top

Can you post your logs?

Not a lot to see, except for maybe “CoronaRuntimeTaskDispatcher.send() doesn’t have an available CoronaRuntime to run this task on! Abort!”

I started this session before I kicked off the install from the play store


C:\Users\clint\AppData\Local\Android\sdk\platform-tools>adb logcat Corona:v *:s

--------- beginning of system

--------- beginning of crash

--------- beginning of main

08-30 13:23:21.957 17488  5439 V Corona  : > Class.forName: network.LuaLoader

08-30 13:23:21.957 17488  5439 V Corona  : < Class.forName: network.LuaLoader

08-30 13:23:21.957 17488  5439 V Corona  : Loading via reflection: network.LuaLoader

08-30 13:23:21.974 17488  5439 I Corona  : Platform: SM-G920T / ARM Neon / 7.0 / Mali-T760 / OpenGL ES 3.2 v1.r15p0-00rel0.68b65ac7cf15907aeb95fa944f39eef2 / 2017.3119 / English | US | en_US | en

08-30 13:23:21.989 17488  5439 V Corona  : > Class.forName: shared.google.play.services.base.LuaLoader

08-30 13:23:21.991 17488  5439 V Corona  : < Class.forName: shared.google.play.services.base.LuaLoader

08-30 13:23:21.991 17488  5439 V Corona  : Loading via reflection: shared.google.play.services.base.LuaLoader

08-30 13:23:22.007 17488  5439 V Corona  : > Class.forName: _CoronaSetup.LuaLoader

08-30 13:23:22.009 17488  5439 V Corona  : > Class.forName: plugin.liveBuild.LuaLoader

08-30 13:23:22.009 17488  5439 V Corona  : < Class.forName: plugin.liveBuild.LuaLoader

08-30 13:23:22.009 17488  5439 V Corona  : Loading via reflection: plugin.liveBuild.LuaLoader

08-30 13:23:22.032 17488  5439 V Corona  : > Class.forName: plugin.appodeal.LuaLoader

08-30 13:23:22.034 17488  5439 V Corona  : < Class.forName: plugin.appodeal.LuaLoader

08-30 13:23:22.034 17488  5439 V Corona  : Loading via reflection: plugin.appodeal.LuaLoader

08-30 13:23:22.039 17488  5439 V Corona  : > Class.forName: plugin.firebaseInvites.LuaLoader

08-30 13:23:22.040 17488  5439 V Corona  : < Class.forName: plugin.firebaseInvites.LuaLoader

08-30 13:23:22.040 17488  5439 V Corona  : Loading via reflection: plugin.firebaseInvites.LuaLoader

08-30 13:23:22.040 17488  5439 V Corona  : > Class.forName: plugin.firebaseAuth.LuaLoader

08-30 13:23:22.040 17488  5439 V Corona  : < Class.forName: plugin.firebaseAuth.LuaLoader

08-30 13:23:22.040 17488  5439 V Corona  : Loading via reflection: plugin.firebaseAuth.LuaLoader

08-30 13:23:22.044 17488  5439 V Corona  : > Class.forName: plugin.volumeControl.LuaLoader

08-30 13:23:22.044 17488  5439 V Corona  : < Class.forName: plugin.volumeControl.LuaLoader

08-30 13:23:22.044 17488  5439 V Corona  : Loading via reflection: plugin.volumeControl.LuaLoader

08-30 13:23:22.045 17488  5439 V Corona  : > Class.forName: plugin.bassBoost.LuaLoader

08-30 13:23:22.045 17488  5439 V Corona  : < Class.forName: plugin.bassBoost.LuaLoader

08-30 13:23:22.045 17488  5439 V Corona  : Loading via reflection: plugin.bassBoost.LuaLoader

08-30 13:23:22.084 17488  5439 V Corona  : > Class.forName: OneSignal.LuaLoader

08-30 13:23:22.087 17488  5439 V Corona  : < Class.forName: OneSignal.LuaLoader

08-30 13:23:22.087 17488  5439 V Corona  : Loading via reflection: OneSignal.LuaLoader

08-30 13:23:22.089 17488  5439 I Corona  : Starting Corona OneSignal SDK v1.13.3

08-30 13:23:22.153 17488  5439 I Corona  : plugin.appodeal: 1.3

08-30 13:23:22.557 17488  5439 V Corona  : > Class.forName: CoronaProvider.licensing.google.LuaLoader

08-30 13:23:22.557 17488  5439 V Corona  : < Class.forName: CoronaProvider.licensing.google.LuaLoader

08-30 13:23:22.559 17488  5439 V Corona  : Loading via reflection: CoronaProvider.licensing.google.LuaLoader

08-30 13:25:57.708 11902 12014 V Corona  : > Class.forName: network.LuaLoader

08-30 13:25:57.708 11902 12014 V Corona  : < Class.forName: network.LuaLoader

08-30 13:25:57.709 11902 12014 V Corona  : Loading via reflection: network.LuaLoader

08-30 13:25:57.739 11902 12014 I Corona  : Platform: SM-G920T / ARM Neon / 7.0 / Mali-T760 / OpenGL ES 3.2 v1.r15p0-00rel0.68b65ac7cf15907aeb95fa944f39eef2 / 2017.3119 / English | US | en_US | en

08-30 13:25:57.797 11902 12014 V Corona  : > Class.forName: shared.google.play.services.base.LuaLoader

08-30 13:25:57.804 11902 12014 V Corona  : < Class.forName: shared.google.play.services.base.LuaLoader

08-30 13:25:57.805 11902 12014 V Corona  : Loading via reflection: shared.google.play.services.base.LuaLoader

08-30 13:25:57.868 11902 12014 V Corona  : > Class.forName: _CoronaSetup.LuaLoader

08-30 13:25:57.874 11902 12014 V Corona  : > Class.forName: plugin.liveBuild.LuaLoader

08-30 13:25:57.874 11902 12014 V Corona  : < Class.forName: plugin.liveBuild.LuaLoader

08-30 13:25:57.897 11902 12014 V Corona  : Loading via reflection: plugin.liveBuild.LuaLoader

08-30 13:25:58.267 11902 12014 V Corona  : > Class.forName: CoronaProvider.licensing.google.LuaLoader

08-30 13:25:58.268 11902 12014 V Corona  : < Class.forName: CoronaProvider.licensing.google.LuaLoader

08-30 13:25:58.274 11902 12014 V Corona  : Loading via reflection: CoronaProvider.licensing.google.LuaLoader

08-30 13:25:58.279 11902 12014 V Corona  : > Class.forName: config.LuaLoader

08-30 13:25:58.281 11902 12014 I Corona  : WARNING: Could not load class ‘config.LuaLoader’

08-30 13:26:06.362 11902 11902 I Corona  : CoronaRuntimeTaskDispatcher.send() doesn’t have an available CoronaRuntime to run this task on! Abort!

08-30 13:26:06.464 11902 13124 V Corona  : > Class.forName: network.LuaLoader

08-30 13:26:06.464 11902 13124 V Corona  : < Class.forName: network.LuaLoader

08-30 13:26:06.464 11902 13124 V Corona  : Loading via reflection: network.LuaLoader

08-30 13:26:06.467 11902 13124 I Corona  : Platform: SM-G920T / ARM Neon / 7.0 / Mali-T760 / OpenGL ES 3.2 v1.r15p0-00rel0.68b65ac7cf15907aeb95fa944f39eef2 / 2017.3119 / English | US | en_US | en

08-30 13:26:06.482 11902 13124 V Corona  : > Class.forName: shared.google.play.services.base.LuaLoader

08-30 13:26:06.482 11902 13124 V Corona  : < Class.forName: shared.google.play.services.base.LuaLoader

08-30 13:26:06.482 11902 13124 V Corona  : Loading via reflection: shared.google.play.services.base.LuaLoader

08-30 13:26:06.506 11902 13124 V Corona  : > Class.forName: _CoronaSetup.LuaLoader

08-30 13:26:06.511 11902 13124 V Corona  : > Class.forName: plugin.liveBuild.LuaLoader

08-30 13:26:06.511 11902 13124 V Corona  : < Class.forName: plugin.liveBuild.LuaLoader

08-30 13:26:06.511 11902 13124 V Corona  : Loading via reflection: plugin.liveBuild.LuaLoader

08-30 13:26:06.546 11902 13124 V Corona  : > Class.forName: plugin.firebaseInvites.LuaLoader

08-30 13:26:06.547 11902 13124 V Corona  : < Class.forName: plugin.firebaseInvites.LuaLoader

08-30 13:26:06.548 11902 13124 V Corona  : Loading via reflection: plugin.firebaseInvites.LuaLoader

08-30 13:26:06.550 11902 13124 V Corona  : > Class.forName: plugin.firebaseAuth.LuaLoader

08-30 13:26:06.551 11902 13124 V Corona  : < Class.forName: plugin.firebaseAuth.LuaLoader

08-30 13:26:06.551 11902 13124 V Corona  : Loading via reflection: plugin.firebaseAuth.LuaLoader

08-30 13:26:06.573 11902 13124 V Corona  : > Class.forName: plugin.volumeControl.LuaLoader

08-30 13:26:06.573 11902 13124 V Corona  : < Class.forName: plugin.volumeControl.LuaLoader

08-30 13:26:06.573 11902 13124 V Corona  : Loading via reflection: plugin.volumeControl.LuaLoader

08-30 13:26:06.575 11902 13124 V Corona  : > Class.forName: plugin.bassBoost.LuaLoader

08-30 13:26:06.575 11902 13124 V Corona  : < Class.forName: plugin.bassBoost.LuaLoader

08-30 13:26:06.576 11902 13124 V Corona  : Loading via reflection: plugin.bassBoost.LuaLoader

08-30 13:26:06.643 11902 13124 V Corona  : > Class.forName: plugin.appodeal.LuaLoader

08-30 13:26:06.649 11902 13124 V Corona  : < Class.forName: plugin.appodeal.LuaLoader

08-30 13:26:06.649 11902 13124 V Corona  : Loading via reflection: plugin.appodeal.LuaLoader

08-30 13:26:06.717 11902 13124 V Corona  : > Class.forName: OneSignal.LuaLoader

08-30 13:26:06.725 11902 13124 V Corona  : < Class.forName: OneSignal.LuaLoader

08-30 13:26:06.725 11902 13124 V Corona  : Loading via reflection: OneSignal.LuaLoader

08-30 13:26:06.730 11902 13124 I Corona  : Starting Corona OneSignal SDK v1.13.3

08-30 13:26:06.919 11902 13124 I Corona  : plugin.appodeal: 1.3

08-30 13:26:08.697 11902 13124 V Corona  : > Class.forName: CoronaProvider.licensing.google.LuaLoader

08-30 13:26:08.697 11902 13124 V Corona  : < Class.forName: CoronaProvider.licensing.google.LuaLoader

08-30 13:26:08.697 11902 13124 V Corona  : Loading via reflection: CoronaProvider.licensing.google.LuaLoader

08-30 13:26:25.783 11902 15141 V Corona  : > Class.forName: network.LuaLoader

08-30 13:26:25.783 11902 15141 V Corona  : < Class.forName: network.LuaLoader

08-30 13:26:25.783 11902 15141 V Corona  : Loading via reflection: network.LuaLoader

08-30 13:26:25.792 11902 15141 I Corona  : Platform: SM-G920T / ARM Neon / 7.0 / Mali-T760 / OpenGL ES 3.2 v1.r15p0-00rel0.68b65ac7cf15907aeb95fa944f39eef2 / 2017.3119 / English | US | en_US | en

08-30 13:26:25.816 11902 15141 V Corona  : > Class.forName: shared.google.play.services.base.LuaLoader

08-30 13:26:25.816 11902 15141 V Corona  : < Class.forName: shared.google.play.services.base.LuaLoader

08-30 13:26:25.816 11902 15141 V Corona  : Loading via reflection: shared.google.play.services.base.LuaLoader

08-30 13:26:25.830 11902 15141 V Corona  : > Class.forName: _CoronaSetup.LuaLoader

08-30 13:26:25.834 11902 15141 V Corona  : > Class.forName: plugin.liveBuild.LuaLoader

08-30 13:26:25.834 11902 15141 V Corona  : < Class.forName: plugin.liveBuild.LuaLoader

08-30 13:26:25.834 11902 15141 V Corona  : Loading via reflection: plugin.liveBuild.LuaLoader

08-30 13:26:25.854 11902 15141 V Corona  : > Class.forName: plugin.appodeal.LuaLoader

08-30 13:26:25.855 11902 15141 V Corona  : < Class.forName: plugin.appodeal.LuaLoader

08-30 13:26:25.855 11902 15141 V Corona  : Loading via reflection: plugin.appodeal.LuaLoader

08-30 13:26:25.863 11902 15141 V Corona  : > Class.forName: plugin.firebaseInvites.LuaLoader

08-30 13:26:25.863 11902 15141 V Corona  : < Class.forName: plugin.firebaseInvites.LuaLoader

08-30 13:26:25.863 11902 15141 V Corona  : Loading via reflection: plugin.firebaseInvites.LuaLoader

08-30 13:26:25.863 11902 15141 V Corona  : > Class.forName: plugin.firebaseAuth.LuaLoader

08-30 13:26:25.863 11902 15141 V Corona  : < Class.forName: plugin.firebaseAuth.LuaLoader

08-30 13:26:25.863 11902 15141 V Corona  : Loading via reflection: plugin.firebaseAuth.LuaLoader

08-30 13:26:25.868 11902 15141 V Corona  : > Class.forName: plugin.volumeControl.LuaLoader

08-30 13:26:25.868 11902 15141 V Corona  : < Class.forName: plugin.volumeControl.LuaLoader

08-30 13:26:25.868 11902 15141 V Corona  : Loading via reflection: plugin.volumeControl.LuaLoader

08-30 13:26:25.869 11902 15141 V Corona  : > Class.forName: plugin.bassBoost.LuaLoader

08-30 13:26:25.870 11902 15141 V Corona  : < Class.forName: plugin.bassBoost.LuaLoader

08-30 13:26:25.870 11902 15141 V Corona  : Loading via reflection: plugin.bassBoost.LuaLoader

08-30 13:26:25.903 11902 15141 V Corona  : > Class.forName: OneSignal.LuaLoader

08-30 13:26:25.903 11902 15141 V Corona  : < Class.forName: OneSignal.LuaLoader

08-30 13:26:25.903 11902 15141 V Corona  : Loading via reflection: OneSignal.LuaLoader

08-30 13:26:25.905 11902 15141 I Corona  : Starting Corona OneSignal SDK v1.13.3

08-30 13:26:25.939 11902 15141 I Corona  : plugin.appodeal: 1.3

08-30 13:26:27.034 11902 15141 V Corona  : > Class.forName: CoronaProvider.licensing.google.LuaLoader

08-30 13:26:27.034 11902 15141 V Corona  : < Class.forName: CoronaProvider.licensing.google.LuaLoader

08-30 13:26:27.034 11902 15141 V Corona  : Loading via reflection: CoronaProvider.licensing.google.LuaLoader

08-30 13:27:47.572 11902 15141 V Corona  : > Class.forName: plugin.firebaseDatabase.LuaLoader

08-30 13:27:47.573 11902 15141 V Corona  : < Class.forName: plugin.firebaseDatabase.LuaLoader

08-30 13:27:47.574 11902 15141 V Corona  : Loading via reflection: plugin.firebaseDatabase.LuaLoader

Try rebuilding

I finally made it back around to this.  After rebuilding I’m back to the Error 3 again.  For grins I deleted the Fingerprints from Firebase, generated new ones, and applied the latest google-services.json file.  No help.

Thinking there may be a conflict between my local build and my Alpha release in the playstore, I created a new Alpha and uploaded my latest prod APK.  Still no help (Google confirmed that is was published).

Any ideas?  This is my last major item before moving to Beta.  I was thinking of just rolling my own, but I can’t seem to find a REST reference for the Invite stuff.

Error 3 equals fingerprint error from keystore. There is nothing changed in the code that would cause this error.

Once again, Scott is correct.  Where I went wrong was generating certs locally against my release keystore.  I have an Alpha release in the Play store and Firebase requires the SHA fingerprints to match the ones located in the App signing certificate.  What previously worked for me became invalid when I issued a new Alpha release. (Presumably)

Google Play Console > Release Managment > App Signing