desof Well-Known Member Licensed User Longtime User Mar 13, 2019 #1 I'm using the FirebaseRemoteConfig 2.0.1 library and now updating everything from SDK Manager does not work for me anymore. I get an error when trying to initialize on the first line Code: Copy cfg.Initialize("Config") cfg.Defaults(CreateMap("app_version": 101, "bd_com_version": 53, "publicita_ctdad": 5, "publicita_folder": "popup", "publicita_frec": 5)) cfg.fetch(-1) the error it gives is this >>> Code: Copy (Exception) java.lang.Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.remoteconfig.FirebaseRemoteConfig com.google.firebase.remoteconfig.RemoteConfigComponent.get(java.lang.String)' on a null object reference How can i fix this?
I'm using the FirebaseRemoteConfig 2.0.1 library and now updating everything from SDK Manager does not work for me anymore. I get an error when trying to initialize on the first line Code: Copy cfg.Initialize("Config") cfg.Defaults(CreateMap("app_version": 101, "bd_com_version": 53, "publicita_ctdad": 5, "publicita_folder": "popup", "publicita_frec": 5)) cfg.fetch(-1) the error it gives is this >>> Code: Copy (Exception) java.lang.Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.remoteconfig.FirebaseRemoteConfig com.google.firebase.remoteconfig.RemoteConfigComponent.get(java.lang.String)' on a null object reference How can i fix this?
DonManfred Expert Licensed User Longtime User Mar 14, 2019 #2 desof said: How can i fix this? Click to expand... Don´t know. Never used the lib for years. Sounds like they changed the Api in some kind. Maybe the lib needs an Update. But if so then i need to rewrite it to 100% as i lost the source in 2017 due to a HDD Crash. I did found the source (had a backup of this lib). Try the attached 2-02 Attachments FirebaseRemoteConfigV2.02.zip FirebaseRemoteConfigV2.02.zip 8 KB · Views: 675 Last edited: Mar 14, 2019 Upvote 0
desof said: How can i fix this? Click to expand... Don´t know. Never used the lib for years. Sounds like they changed the Api in some kind. Maybe the lib needs an Update. But if so then i need to rewrite it to 100% as i lost the source in 2017 due to a HDD Crash. I did found the source (had a backup of this lib). Try the attached 2-02
desof Well-Known Member Licensed User Longtime User Mar 14, 2019 #3 DonManfred said: Don´t know. Never used the lib for years. Sounds like they changed the Api in some kind. Maybe the lib needs an Update. But if so then i need to rewrite it to 100% as i lost the source in 2017 due to a HDD Crash. I did found the source (had a backup of this lib). Try the attached 2-02 Click to expand... Hello friend DonManfred, now with the update I successfully passed the line cfg.Initialize ("Config") and I get an error in the next one that is this >> Code: Copy (Exception) java.lang.Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.remoteconfig.FirebaseRemoteConfig com.google.firebase.remoteconfig.RemoteConfigComponent.get(java.lang.String)' on a null object reference Is it possible that I am creating MAP badly? So I am using >> Code: Copy Dim M As Map M.Initialize M=CreateMap("app_version": 101, "bd_com_version": 53, "popup", "publicita_frec": 5) cfg.Initialize("Config") cfg.setDefaults2(m,"Config") cfg.fetch2(1) Upvote 0
DonManfred said: Don´t know. Never used the lib for years. Sounds like they changed the Api in some kind. Maybe the lib needs an Update. But if so then i need to rewrite it to 100% as i lost the source in 2017 due to a HDD Crash. I did found the source (had a backup of this lib). Try the attached 2-02 Click to expand... Hello friend DonManfred, now with the update I successfully passed the line cfg.Initialize ("Config") and I get an error in the next one that is this >> Code: Copy (Exception) java.lang.Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.remoteconfig.FirebaseRemoteConfig com.google.firebase.remoteconfig.RemoteConfigComponent.get(java.lang.String)' on a null object reference Is it possible that I am creating MAP badly? So I am using >> Code: Copy Dim M As Map M.Initialize M=CreateMap("app_version": 101, "bd_com_version": 53, "popup", "publicita_frec": 5) cfg.Initialize("Config") cfg.setDefaults2(m,"Config") cfg.fetch2(1)
GMan Well-Known Member Licensed User Longtime User Mar 14, 2019 #4 AFAIK is a map a combination of a keyword and the value IN ONE LINE each Upvote 0
DonManfred Expert Licensed User Longtime User Mar 14, 2019 #5 GMan said: AFAIK is a map a combination of a keyword and the value IN ONE LINE each Click to expand... https://www.b4x.com/android/forum/pages/results/?query=createmap Upvote 0
GMan said: AFAIK is a map a combination of a keyword and the value IN ONE LINE each Click to expand... https://www.b4x.com/android/forum/pages/results/?query=createmap
desof Well-Known Member Licensed User Longtime User Mar 15, 2019 #6 GMan said: AFAIK is a map a combination of a keyword and the value IN ONE LINE each Click to expand... it has nothing to do with his answer. I know how to use maps there is only one error in the transcripts reduced to this forum. THE ERROR EXISTS! Upvote 0
GMan said: AFAIK is a map a combination of a keyword and the value IN ONE LINE each Click to expand... it has nothing to do with his answer. I know how to use maps there is only one error in the transcripts reduced to this forum. THE ERROR EXISTS!
C CGP Member Licensed User Longtime User Mar 19, 2019 #7 I have the same problem too. Code: Copy java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.remoteconfig.FirebaseRemoteConfig com.google.firebase.remoteconfig.zzg.zzbd(java.lang.String)' on a null object reference at com.google.firebase.remoteconfig.FirebaseRemoteConfig.getInstance(Unknown Source:3) at de.donmanfred.FirebaseRemoteConfigwrapper.setDefaults(FirebaseRemoteConfigwrapper.java:107) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:777) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:354) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144) at anywheresoftware.b4a.BA.raiseEvent(BA.java:176) at b4a.donmanfred.GCM.starter.handleStart(starter.java:100) at b4a.donmanfred.GCM.starter.access$000(starter.java:8) at b4a.donmanfred.GCM.starter$1.run(starter.java:71) at anywheresoftware.b4a.objects.ServiceHelper$StarterHelper.onStartCommand(ServiceHelper.java:235) at b4a.donmanfred.GCM.starter.onStartCommand(starter.java:69) at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3513) at android.app.ActivityThread.-wrap20(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1721) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:173) at android.app.ActivityThread.main(ActivityThread.java:6651) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:822) Upvote 0
I have the same problem too. Code: Copy java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.remoteconfig.FirebaseRemoteConfig com.google.firebase.remoteconfig.zzg.zzbd(java.lang.String)' on a null object reference at com.google.firebase.remoteconfig.FirebaseRemoteConfig.getInstance(Unknown Source:3) at de.donmanfred.FirebaseRemoteConfigwrapper.setDefaults(FirebaseRemoteConfigwrapper.java:107) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:777) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:354) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144) at anywheresoftware.b4a.BA.raiseEvent(BA.java:176) at b4a.donmanfred.GCM.starter.handleStart(starter.java:100) at b4a.donmanfred.GCM.starter.access$000(starter.java:8) at b4a.donmanfred.GCM.starter$1.run(starter.java:71) at anywheresoftware.b4a.objects.ServiceHelper$StarterHelper.onStartCommand(ServiceHelper.java:235) at b4a.donmanfred.GCM.starter.onStartCommand(starter.java:69) at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3513) at android.app.ActivityThread.-wrap20(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1721) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:173) at android.app.ActivityThread.main(ActivityThread.java:6651) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:822)
desof Well-Known Member Licensed User Longtime User Mar 25, 2019 #8 It seems that we are very few who use this, do not we? Or only we have problems at least! I had to modify my application significantly, removing an important function for not being able to access Firebase anymore. Very unfortunate Upvote 0
It seems that we are very few who use this, do not we? Or only we have problems at least! I had to modify my application significantly, removing an important function for not being able to access Firebase anymore. Very unfortunate
DonManfred Expert Licensed User Longtime User Mar 25, 2019 #9 It does not work for me too bu i don´t know what i could do. I tried to compile the library again with new dependencies but it does not change anything. Unfortunately i don´t know what i need to change... Upvote 0
It does not work for me too bu i don´t know what i could do. I tried to compile the library again with new dependencies but it does not change anything. Unfortunately i don´t know what i need to change...
Jack Cole Well-Known Member Licensed User Longtime User May 29, 2019 #10 I am having this problem too. I tried the 2.02 and 2.01. I get errors elsewhere in the code. It gives an error on cfg.isInitialized -- unknown member. The following line also gives an error: cfg.Defaults(CreateMap("RB_Launch_Count": 3, "loading_phrase": "Hallo world!")) Property: Defaults is writeonly. Anyway, I get this error after commenting out the above. java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.remoteconfig.FirebaseRemoteConfig com.google.firebase.remoteconfig.RemoteConfigComponent.get(java.lang.String)' on a null object reference Please post the Java code. I'm no Java expert, but I will take a look. Upvote 0
I am having this problem too. I tried the 2.02 and 2.01. I get errors elsewhere in the code. It gives an error on cfg.isInitialized -- unknown member. The following line also gives an error: cfg.Defaults(CreateMap("RB_Launch_Count": 3, "loading_phrase": "Hallo world!")) Property: Defaults is writeonly. Anyway, I get this error after commenting out the above. java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.remoteconfig.FirebaseRemoteConfig com.google.firebase.remoteconfig.RemoteConfigComponent.get(java.lang.String)' on a null object reference Please post the Java code. I'm no Java expert, but I will take a look.
DonManfred Expert Licensed User Longtime User May 30, 2019 #11 the source is in the library thread. Upvote 0
DonManfred Expert Licensed User Longtime User May 30, 2019 #12 I´ve updated the Library to v2.5 - It now includes Instructions on how to setup the Manifest to use RemoteConfig. Google has changed the Manifestintegration. A new Snippet is needed. I´ve added the new Snippet to the library like i had done it with Firestore (not the same but similar). Last edited: May 30, 2019 Upvote 0
I´ve updated the Library to v2.5 - It now includes Instructions on how to setup the Manifest to use RemoteConfig. Google has changed the Manifestintegration. A new Snippet is needed. I´ve added the new Snippet to the library like i had done it with Firestore (not the same but similar).
Jack Cole Well-Known Member Licensed User Longtime User May 30, 2019 #13 It seems you have fixed it! Thanks! Upvote 0
SMOOTSARA Active Member Licensed User Longtime User Sep 10, 2020 #14 DonManfred said: I´ve updated the Library to v2.5 - It now includes Instructions on how to setup the Manifest to use RemoteConfig. Google has changed the Manifestintegration. A new Snippet is needed. I´ve added the new Snippet to the library like i had done it with Firestore (not the same but similar). Click to expand... Hi DonManfred I recently installed version B4A 10.2 beta Before these changes, the library worked good, but now it crash with the following error. B4X: Copy (NullPointerException) java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.remoteconfig.FirebaseRemoteConfig com.google.firebase.remoteconfig.RemoteConfigComponent.getDefault()' on a null object reference b4x ver 10.2 beta lib ver 2.52 B4X: Copy *** Service (starter) Create *** remote_host_initialize (B4A line: 31) cfg.Initialize("Config") java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.remoteconfig.FirebaseRemoteConfig com.google.firebase.remoteconfig.RemoteConfigComponent.getDefault()' on a null object reference at com.google.firebase.remoteconfig.FirebaseRemoteConfig.getInstance(FirebaseRemoteConfig.java:87) at com.google.firebase.remoteconfig.FirebaseRemoteConfig.getInstance(FirebaseRemoteConfig.java:81) at de.donmanfred.FirebaseRemoteConfigwrapper.Initialize(FirebaseRemoteConfigwrapper.java:36) at xxxx.xxx.com.remote_host._initialize(remote_host.java:696) at xxxx.xxx.com.starter._service_create(starter.java:404) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213) at anywheresoftware.b4a.BA.raiseEvent(BA.java:193) at xxxx.xxx.com.starter.onCreate(starter.java:56) at android.app.ActivityThread.handleCreateService(ActivityThread.java:3953) at android.app.ActivityThread.access$1500(ActivityThread.java:219) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1875) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) java.lang.RuntimeException: Unable to create service xxxx.xxx.com.starter: java.lang.RuntimeException: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.remoteconfig.FirebaseRemoteConfig com.google.firebase.remoteconfig.RemoteConfigComponent.getDefault()' on a null object reference at android.app.ActivityThread.handleCreateService(ActivityThread.java:3965) at android.app.ActivityThread.access$1500(ActivityThread.java:219) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1875) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) Caused by: java.lang.RuntimeException: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.remoteconfig.FirebaseRemoteConfig com.google.firebase.remoteconfig.RemoteConfigComponent.getDefault()' on a null object reference at anywheresoftware.b4a.BA.raiseEvent2(BA.java:250) at anywheresoftware.b4a.BA.raiseEvent(BA.java:193) at xxxx.xxx.com.starter.onCreate(starter.java:56) at android.app.ActivityThread.handleCreateService(ActivityThread.java:3953) ... 8 more Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.remoteconfig.FirebaseRemoteConfig com.google.firebase.remoteconfig.RemoteConfigComponent.getDefault()' on a null object reference at com.google.firebase.remoteconfig.FirebaseRemoteConfig.getInstance(FirebaseRemoteConfig.java:87) at com.google.firebase.remoteconfig.FirebaseRemoteConfig.getInstance(FirebaseRemoteConfig.java:81) at de.donmanfred.FirebaseRemoteConfigwrapper.Initialize(FirebaseRemoteConfigwrapper.java:36) at xxxx.xxx.com.remote_host._initialize(remote_host.java:696) at xxxx.xxx.com.starter._service_create(starter.java:404) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213) ... 11 more Initialize OneSignal Upvote 0
DonManfred said: I´ve updated the Library to v2.5 - It now includes Instructions on how to setup the Manifest to use RemoteConfig. Google has changed the Manifestintegration. A new Snippet is needed. I´ve added the new Snippet to the library like i had done it with Firestore (not the same but similar). Click to expand... Hi DonManfred I recently installed version B4A 10.2 beta Before these changes, the library worked good, but now it crash with the following error. B4X: Copy (NullPointerException) java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.remoteconfig.FirebaseRemoteConfig com.google.firebase.remoteconfig.RemoteConfigComponent.getDefault()' on a null object reference b4x ver 10.2 beta lib ver 2.52 B4X: Copy *** Service (starter) Create *** remote_host_initialize (B4A line: 31) cfg.Initialize("Config") java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.remoteconfig.FirebaseRemoteConfig com.google.firebase.remoteconfig.RemoteConfigComponent.getDefault()' on a null object reference at com.google.firebase.remoteconfig.FirebaseRemoteConfig.getInstance(FirebaseRemoteConfig.java:87) at com.google.firebase.remoteconfig.FirebaseRemoteConfig.getInstance(FirebaseRemoteConfig.java:81) at de.donmanfred.FirebaseRemoteConfigwrapper.Initialize(FirebaseRemoteConfigwrapper.java:36) at xxxx.xxx.com.remote_host._initialize(remote_host.java:696) at xxxx.xxx.com.starter._service_create(starter.java:404) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213) at anywheresoftware.b4a.BA.raiseEvent(BA.java:193) at xxxx.xxx.com.starter.onCreate(starter.java:56) at android.app.ActivityThread.handleCreateService(ActivityThread.java:3953) at android.app.ActivityThread.access$1500(ActivityThread.java:219) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1875) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) java.lang.RuntimeException: Unable to create service xxxx.xxx.com.starter: java.lang.RuntimeException: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.remoteconfig.FirebaseRemoteConfig com.google.firebase.remoteconfig.RemoteConfigComponent.getDefault()' on a null object reference at android.app.ActivityThread.handleCreateService(ActivityThread.java:3965) at android.app.ActivityThread.access$1500(ActivityThread.java:219) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1875) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) Caused by: java.lang.RuntimeException: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.remoteconfig.FirebaseRemoteConfig com.google.firebase.remoteconfig.RemoteConfigComponent.getDefault()' on a null object reference at anywheresoftware.b4a.BA.raiseEvent2(BA.java:250) at anywheresoftware.b4a.BA.raiseEvent(BA.java:193) at xxxx.xxx.com.starter.onCreate(starter.java:56) at android.app.ActivityThread.handleCreateService(ActivityThread.java:3953) ... 8 more Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.remoteconfig.FirebaseRemoteConfig com.google.firebase.remoteconfig.RemoteConfigComponent.getDefault()' on a null object reference at com.google.firebase.remoteconfig.FirebaseRemoteConfig.getInstance(FirebaseRemoteConfig.java:87) at com.google.firebase.remoteconfig.FirebaseRemoteConfig.getInstance(FirebaseRemoteConfig.java:81) at de.donmanfred.FirebaseRemoteConfigwrapper.Initialize(FirebaseRemoteConfigwrapper.java:36) at xxxx.xxx.com.remote_host._initialize(remote_host.java:696) at xxxx.xxx.com.starter._service_create(starter.java:404) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213) ... 11 more Initialize OneSignal
DonManfred Expert Licensed User Longtime User Sep 10, 2020 #15 Please do NOT post to existing threads! ALWAYS create a new thread for your Issues. Upvote 0