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

Diagnose API23 crash issue #2636

Open
JamesSmartCell opened this issue Jun 2, 2022 · 1 comment · May be fixed by #2699
Open

Diagnose API23 crash issue #2636

JamesSmartCell opened this issue Jun 2, 2022 · 1 comment · May be fixed by #2699
Assignees

Comments

@JamesSmartCell
Copy link
Member

Zero in on the web3j code that is crashing when we use API23.

  1. Reproduce: Ran an API23 emulator and run the app. It will crash, probably in ticker service when it tries to call the smart contract.
  2. Make it work: Use an older version of web3j (maybe 4.6.0-android or 4.2.1-android). You will have to remove the web3j library dependency and restore the web3j import from Maven. You may have to resolve (or remove eg the 1559 transactions).
  3. Make it work using the local web3j builds. Use this repo: https://github.com/AlphaWallet/web3j follow the build instructions and copy the abi library into the alpha-wallet-android project.
  4. Work out which part of web3j is the culprit, and see if it's possible to back-port just that code (that is, a mix of the forked web3j on the AW repo and the old web3j source).

This may be just a write-up, but ultimately if you can solve the issue it would be very valuable.

@asif-finimble
Copy link
Contributor

@JamesSmartCell

  • As api 23 doesnt support most of java8 features I had to use web3j-3.3.1-android. I updated it with the additional code required in AW. There are 2-3 minor code updates in AW.
  • We only need to use the web3j:core module as it uses java8 code. Other modules are from AW web3j repo and they work fine. Also need to rename the core jar from core-3.3.1 to core-4.8.8 due to gradle error - not sure why.
  • Fixed crashes using modded web3j-3.3.1-android with additional classes and methods from Web3j-4.8.8-android required by AW
  • Modded Web3j-3.3.1: https://github.com/asif-finimble/web3j-AW-backPort

@asif-finimble asif-finimble linked a pull request Jul 4, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants