Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash using Firebase Functions while accessing to shared preferences #3

Closed
wolfiestyle opened this issue Feb 7, 2024 · 1 comment
Closed

Comments

@wolfiestyle
Copy link

wolfiestyle commented Feb 7, 2024

All firebase functions requests fail while trying to access a SharedPreferences key with the format |T|<project_number>|*

[DefaultDispatcher-worker-3] ERROR repository.FirebaseApiRepository - error in on_player_suggestion: java.lang.IllegalArgumentException: |T|123456789|*
[DefaultDispatcher-worker-4] ERROR repository.FirebaseApiRepository - error in on_team_suggestion: java.lang.IllegalArgumentException: |T|123456789|*
java.lang.IllegalArgumentException: |T|123456789|*
	at android.content.Context$getSharedPreferences$1.getString(Context.kt:67)
	at com.google.firebase.iid.Store.getToken(com.google.firebase:firebase-iid@@21.1.0:1)
	at com.google.firebase.iid.FirebaseInstanceId.getTokenWithoutTriggeringSync(com.google.firebase:firebase-iid@@21.1.0:2)
	at com.google.firebase.iid.FirebaseInstanceId.getTokenWithoutTriggeringSync(com.google.firebase:firebase-iid@@21.1.0:1)
	at com.google.firebase.iid.FirebaseInstanceId.getToken(com.google.firebase:firebase-iid@@21.1.0:2)
	at com.google.firebase.iid.Registrar$FIIDInternalAdapter.getToken(com.google.firebase:firebase-iid@@21.1.0:1)
	at com.google.firebase.functions.FirebaseContextProvider.lambda$getContext$2(FirebaseContextProvider.java:76)
	at com.google.android.gms.tasks.zzo.run(com.google.android.gms:play-services-tasks@@18.0.2:1)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at com.google.firebase.concurrent.CustomThreadFactory.lambda$newThread$0(CustomThreadFactory.java:47)
	at java.base/java.lang.Thread.run(Thread.java:833)
java.lang.IllegalArgumentException: |T|123456789|*
	at android.content.Context$getSharedPreferences$1.getString(Context.kt:67)
	at com.google.firebase.iid.Store.getToken(com.google.firebase:firebase-iid@@21.1.0:1)
	at com.google.firebase.iid.FirebaseInstanceId.getTokenWithoutTriggeringSync(com.google.firebase:firebase-iid@@21.1.0:2)
	at com.google.firebase.iid.FirebaseInstanceId.getTokenWithoutTriggeringSync(com.google.firebase:firebase-iid@@21.1.0:1)
	at com.google.firebase.iid.FirebaseInstanceId.getToken(com.google.firebase:firebase-iid@@21.1.0:2)
	at com.google.firebase.iid.Registrar$FIIDInternalAdapter.getToken(com.google.firebase:firebase-iid@@21.1.0:1)
	at com.google.firebase.functions.FirebaseContextProvider.lambda$getContext$2(FirebaseContextProvider.java:76)
	at com.google.android.gms.tasks.zzo.run(com.google.android.gms:play-services-tasks@@18.0.2:1)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at com.google.firebase.concurrent.CustomThreadFactory.lambda$newThread$0(CustomThreadFactory.java:47)
	at java.base/java.lang.Thread.run(Thread.java:833)
@wolfiestyle wolfiestyle changed the title Crash using Firebase functions in access to shared preferences Crash using Firebase Functions while accessing to shared preferences Feb 7, 2024
@nbransby
Copy link
Member

nbransby commented Feb 7, 2024

Thanks for reporting.

Fixed in https://github.com/GitLiveApp/firebase-java-sdk/releases/tag/v0.3.1

@nbransby nbransby closed this as completed Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants