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

Android crashes during service incident #242

Open
anton-chikunov opened this issue Jun 17, 2024 · 0 comments
Open

Android crashes during service incident #242

anton-chikunov opened this issue Jun 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@anton-chikunov
Copy link

Describe the issue

Between 12 June 2024 and 16 June 2024 during service incident, Android crashes at Card Entry screen after press 'Save' button. iOS shows 'unexpected error' alert.
Exception:

Your app just crashed. See the error below.
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
  com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:502)
  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)

Caused by java.lang.reflect.InvocationTargetException
  java.lang.reflect.Method.invoke(Native Method)
  com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)

Caused by com.squareup.moshi.JsonEncodingException: Use JsonReader.setLenient(true) to accept malformed JSON at path $
  com.squareup.moshi.JsonReader.syntaxError(JsonReader.java:243)
  com.squareup.moshi.JsonUtf8Reader.checkLenient(JsonUtf8Reader.java:1152)
  com.squareup.moshi.JsonUtf8Reader.doPeek(JsonUtf8Reader.java:384)
  com.squareup.moshi.JsonUtf8Reader.peek(JsonUtf8Reader.java:206)
  com.squareup.moshi.internal.NullSafeJsonAdapter.fromJson(NullSafeJsonAdapter.java:38)
  com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:58)
  sqip.internal.nonce.RealCreateCardNonceRequestHandler.onResponse(RealCreateCardNonceRequestHandler.kt:132)
  sqip.internal.nonce.RealCreateCardNonceRequestHandler$sendRequest$1.onResponse(RealCreateCardNonceRequestHandler.kt:56)
  retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1.lambda$onResponse$0$retrofit2-DefaultCallAdapterFactory$ExecutorCallbackCall$1(DefaultCallAdapterFactory.java:82)
  retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1$$ExternalSyntheticLambda0.run(Unknown Source:6)
  android.os.Handler.handleCallback(Handler.java:883)
  android.os.Handler.dispatchMessage(Handler.java:100)
  android.os.Looper.loop(Looper.java:214)
  android.app.ActivityThread.main(ActivityThread.java:7397)
  java.lang.reflect.Method.invoke(Native Method)
  com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)

To Reproduce

Today (17 June 2024) it's impossible to reproduce as services are working fine.

Expected behavior

Android should not crash if services are not working on at maintenance.

Environment (please complete the following information):

  • Platform: Android
  • OS: any
  • dev environment: MacOS
  • In-App Payments Plugin version: 1.7.6
System:
  OS: macOS 14.5
  CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Memory: 497.12 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.20.2
    path: ~/.nvm/versions/node/v18.20.2/bin/node
  Yarn:
    version: 1.22.15
    path: ~/.nvm/versions/node/v18.20.2/bin/yarn
  npm:
    version: 10.5.0
    path: ~/.nvm/versions/node/v18.20.2/bin/npm
  Watchman:
    version: 2024.04.22.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /Users/kowalski/.rvm/gems/ruby-2.7.4/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.4
      - iOS 17.4
      - macOS 14.4
      - tvOS 17.4
      - visionOS 1.1
      - watchOS 10.4
  Android SDK:
    API Levels:
      - "29"
      - "30"
      - "31"
      - "33"
      - "34"
    Build Tools:
      - 28.0.3
      - 29.0.3
      - 30.0.3
      - 31.0.0
      - 33.0.0
      - 33.0.2
      - 34.0.0
    System Images:
      - android-30 | Google Play Intel x86 Atom
      - android-31 | Google Play Intel x86_64 Atom
      - android-33 | Google APIs Intel x86_64 Atom
    Android NDK: 23.0.7123448-beta1
IDEs:
  Android Studio: 2024.1 AI-241.15989.150.2411.11948838
  Xcode:
    version: 15.3/15E204a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.11
    path: /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home/bin/javac
  Ruby:
    version: 2.7.4
    path: /Users/kowalski/.rvm/rubies/ruby-2.7.4/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.2
    wanted: 0.74.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Screenshots

No Screenshots

Additional context

I think the reason of crash is html which can't be parsed by moshi in native part of library. I didn't have time to check traffic between server and app to catch the real response of Square in app payments service

@anton-chikunov anton-chikunov added the bug Something isn't working label Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant