firebase / firebase/firebase-unity-sdk
[Bug] Firebase.FirebaseException: Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject
- Dominant language
- C#
- Stars
- 320
- Forks
- 60
- Avg merge
- 13h 32m
- Merged PRs (30d)
- 13
Description
### Description
Hey, I’m currently working more actively on getting App Check running properly in my live project.
I’ve added several detailed log outputs around my initialization process to better understand what’s happening and to enforce App Check sooner or later.
This is the most common App Check error I’m encountering at the moment, and I haven’t been able to find any information on how to resolve it:
App Check Provider: Play Integrity
Affected Users: ~15%
Happens on regular Samsung phones as well, so nothing unusual.
### Reproducing the issue
Hard to reproduce locally since it’s affecting specific users in the live build. In general, it’s just a standard Firebase installation with App Check and Play Integrity for Android.
### Firebase Unity SDK Version
13.4.0
### Unity editor version
6000.0.60f1
### Installation Method
.unitypackage
### Problematic Firebase Component(s)
App Check
### Other Firebase Component(s) in use
Analytics
### Additional SDKs you are using
_No response_
### Targeted Platform(s)
Android
### Unity editor platform
Windows
### Scripting Runtime
IL2CPP
### Release Distribution Type
Pre-built SDK from https://firebase.google.com/download/unity
### Relevant Log Output
```shell
: App Check init failed: System.AggregateException: One or more errors occurred. (Provider returned an Exception: System.AggregateException: One or more errors occurred. (Value Firebase.FirebaseException: Value (Inner Exception #0) Firebase.FirebaseException: Value Firebase.FirebaseException: Provider returned an Exception: System.AggregateException: One or more errors occurred. (Value Firebase.FirebaseException: Value (Inner Exception #0) Firebase.FirebaseException: Value c.b__13_0 (System.Threading.Tasks.Task`1[TResult] task) [0x00000] in <00000000000000000000000000000000>:0
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2[TAntecedentResult,TResult].InnerInvoke () [0x00000] in <00000000000000000000000000000000>:0
at System.Threading.Tasks.Task.Execute () [0x00000] in <00000000000000000000000000000000>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0
at System.Threading.Tasks.Task.ExecuteWithThreadLocal (System.Threading.Tasks.Task& currentTaskSlot) [0x00000] in <00000000000000000000000000000000>:0
at System.Threading.Tasks.Task.ExecuteEntry (System.Boolean bPreventDoubleExecution) [0x00000] in <00000000000000000000000000000000>:0
at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00000] in <00000000000000000000000000000000>:0
--- End of stack trace from previous location where exception was thrown ---
at FirebaseSetup.InitializeAsyncInternal () [0x00000] in <00000000000000000000000000000000>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.UnitySynchronizationContext.Exec () [0x00000] in <00000000000000000000000000000000>:0
---> (Inner Exception #0) Firebase.FirebaseException: Provider returned an Exception: System.AggregateException: One or more errors occurred. (Value Firebase.FirebaseException: Value (Inner Exception #0) Firebase.FirebaseException: Value
Contributor guide
Research direction
Start with the Firebase.AppCheck.FirebaseAppCheck.GetAppCheckTokenAsync and FirebaseSetup.InitializeAsyncInternal stack entries, then inspect the Android App Check and Play Integrity integration in SDK 13.4.0. Determine why affected users receive an HTML
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, csharp, unity
- Domain
- mobile-dev, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100