Please include the following information in your post:
- Which SDK this is regarding: auth0 guardian android sdk
- SDK Version: 0.6.0
- Platform Version: android
- Code Snippets/Error Messages/Supporting Details/Screenshots:
Is this a feature request or bug report? this is a bug report.
Hi ,
I am trying used the android guardian SDK to build a custom appliction
I’ve cloned the sample app for android and library, and can’t get an enrolment to work.
When a barcode is scanned, it says com.auth0.android.guardian.sdk.GuardianException: Error parsing server error response
,
When I debug it using ADB I see below logs,
06-26 11:54:31.499 25463 26011 I okhttp.OkHttpClient: ← 401 https://MY_TENANT_NAME.auth0.com/api/enroll (507ms)
06-26 11:54:31.503 25463 26011 I okhttp.OkHttpClient: Unauthorized
plz see the full logs,
6-26 11:54:30.986 25463 25463 E libEGL : Invalid file path for libcolorx-loader.so
06-26 11:54:30.987 25463 25463 I chatty : uid=10383(com.auth0.guardian.sample) identical 4 lines
06-26 11:54:30.987 25463 25463 E libEGL : Invalid file path for libcolorx-loader.so
06-26 11:54:30.987 25463 25463 I InputTransport: Create ARC handle: 0xb400007621848aa0
06-26 11:54:30.990 25463 26011 I okhttp.OkHttpClient: → POST https://dev-60ywwsqe.us.auth0.com/api/enroll
06-26 11:54:30.990 25463 26011 I okhttp.OkHttpClient: Content-Type: application/json; charset=utf-8
06-26 11:54:30.990 25463 26011 I okhttp.OkHttpClient: Content-Length: 664
06-26 11:54:30.990 25463 26011 I okhttp.OkHttpClient: Authorization: Ticket id=“5lvpy0Fcw4ADDwydT20M9Kl06JlMMbGD”
06-26 11:54:30.990 25463 26011 I okhttp.OkHttpClient: Accept-Language: en_GB
06-26 11:54:30.990 25463 26011 I okhttp.OkHttpClient: User-Agent: GuardianSDK/0.0.1-SNAPSHOT Android 11
06-26 11:54:30.990 25463 26011 I okhttp.OkHttpClient: Auth0-Client: eyJuYW1lIjoiR3VhcmRpYW4uQW5kcm9pZCIsInZlcnNpb24iOiIwLjAuMS1TTkFQU0hPVCJ9
06-26 11:54:30.991 25463 26011 I okhttp.OkHttpClient: {“public_key”:{“kty”:“RSA”,“alg”:“RS256”,“e”:“AQAB”,“use”:“sig”,“n”:“AIXlayXsvZg80jIdwEWmJE_Tz5DBoAaNKewJPozu7nHGn4EL4A3fXr8gHtKiPiW6lcCDgVP3RXsRQDFGoNTjulWOlwJLHp_OHb9mUuKBgWQnEc5LSFeAu7tET0hNB0hplEH369TcDUtZww3X39dxqzn2Qqf3pTbgphIKzfpO9Dxm5rNkmuQ1rYOElH-_SVcuk_LKQgs63okc2CjSfDeyDWR4cfQobwiAwUBdgK-CnHeIqQHV0d8qw9Y5P1NKHsA6SQNi3V_Kj30rCaYPKFsX97Nqp6rtHqVxns804AdnPTnKFQrLrjWmw3TutPTYCfNbisRudxI_pn51BgTKgxAaSLs”},“identifier”:“b906cad41b570a72”,“name”:“CPH2001”,“push_credentials”:{“service”:“GCM”,“token”:“ekim5vMKxHA:APA91bFcR-vU8qMh2ZS9Q6-2irAOMY0ju9B24i5XvzhnxFIMgu0m-60bJBRsJoitHIiZpjOO-fKyuWzFXd9U409umw_urAHRAEj5aIxAIl90gob_Q9aQXBgoMlU6oDqHOTPuyyXARjGj”}}
06-26 11:54:30.991 25463 26011 I okhttp.OkHttpClient: → END POST (664-byte body)
06-26 11:54:31.014 25463 25463 V OplusZoomWindowDecorViewHelper: setLastReportedMergedConfiguration mZoomDisplayHeight: 2400 getDecorView.DecorView@439e105[EnrollActivity]
06-26 11:54:31.016 783 1286 I BufferQueueProducer: com.auth0.guardian.sample/com.auth0.guardian.sample.EnrollActivity#1 connect(): api=1 producerControlledByApp=false
06-26 11:54:31.031 783 1286 D DispPerfService: onframeavailable pid=25463, slot=2, seq=21354, name=com.auth0.guardian.sample:com.auth0.guardian.sample/com.auth0.guardian.sample.EnrollActivity#1
06-26 11:54:31.036 783 1286 I BufferQueueProducer: com.auth0.guardian.sample/com.auth0.guardian.sample.EnrollActivity#0 queueBuffer: fps=9.05 dur=1657.32 max=699.47 min=49.14
06-26 11:54:31.499 25463 26011 I okhttp.OkHttpClient: ← 401 https://MY_TENANT_NAME.us.auth0.com/api/enroll (507ms)
06-26 11:54:31.499 25463 26011 I okhttp.OkHttpClient: date: Sun, 26 Jun 2022 06:24:31 GMT
06-26 11:54:31.499 25463 26011 I okhttp.OkHttpClient: content-length: 12
06-26 11:54:31.500 25463 26011 I okhttp.OkHttpClient: cf-ray: 7213dc40e9b7b2f9-CMB
06-26 11:54:31.500 25463 26011 I okhttp.OkHttpClient: cache-control: private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0, no-transform
06-26 11:54:31.500 25463 26011 I okhttp.OkHttpClient: strict-transport-security: max-age=31536000
06-26 11:54:31.500 25463 26011 I okhttp.OkHttpClient: www-authenticate: Bearer realm=“Users”, Bearer realm=“Users”, Missing authentication tokens
06-26 11:54:31.500 25463 26011 I okhttp.OkHttpClient: cf-cache-status: DYNAMIC
06-26 11:54:31.500 25463 26011 I okhttp.OkHttpClient: expect-ct: max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”
06-26 11:54:31.500 25463 26011 I okhttp.OkHttpClient: ot-baggage-auth0-request-id: 7213dc40e9b7b2f9
06-26 11:54:31.500 25463 26011 I okhttp.OkHttpClient: ot-tracer-sampled: true
06-26 11:54:31.501 25463 26011 I okhttp.OkHttpClient: ot-tracer-spanid: 55e478dd700e12eb
06-26 11:54:31.501 25463 26011 I okhttp.OkHttpClient: ot-tracer-traceid: 6bd1c1dd53dd7f3a
06-26 11:54:31.501 25463 26011 I okhttp.OkHttpClient: traceparent: 00-55e478dd700e12eb-00000000000000006bd1c1dd53dd7f3a-01
06-26 11:54:31.501 25463 26011 I okhttp.OkHttpClient: tracestate: auth0-request-id=7213dc40e9b7b2f9
06-26 11:54:31.501 25463 26011 I okhttp.OkHttpClient: x-auth0-requestid: 530204b247221f8fe634
06-26 11:54:31.501 25463 26011 I okhttp.OkHttpClient: x-content-type-options: nosniff
06-26 11:54:31.501 25463 26011 I okhttp.OkHttpClient: vary: Accept-Encoding
06-26 11:54:31.502 25463 26011 I okhttp.OkHttpClient: server: cloudflare
06-26 11:54:31.502 25463 26011 I okhttp.OkHttpClient: alt-svc: h3=“:443”; ma=86400, h3-29=“:443”; ma=86400
06-26 11:54:31.503 25463 26011 I okhttp.OkHttpClient: Unauthorized
06-26 11:54:31.503 25463 26011 I okhttp.OkHttpClient: ← END HTTP (12-byte body)
06-26 11:54:31.507 25463 26011 E com.auth0.guardian.sample.DialogCallback: Guardian error
06-26 11:54:31.507 25463 26011 E com.auth0.guardian.sample.DialogCallback: com.auth0.android.guardian.sdk.GuardianException: Error parsing server error response
06-26 11:54:31.507 25463 26011 E com.auth0.guardian.sample.DialogCallback: at com.auth0.android.guardian.sdk.networking.Request.exceptionFromErrorResponse(Request.java:191)
It seems https://MY_TENANT_NAME.auth0.com/api/enroll endpoint is not authenticated.
I see a similar issues in the github, but those has not resolved.
Can some one help me on this ?