qml: sharing large psbt raises android TransactionTooLargeException
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.6k
- Forks
- 3.5k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 61
Description
Description
When clicking on the share button of a large (>1mb) psbt in QML, Android will raise a android.os.TransactionTooLargeException as the size limit for data shared through an Activity seems to be ~1mb.
We could for example allow exporting the psbt by saving it as file instead of sharing it.
Traceback (most recent call last):
File "app/electrum/gui/qml/qeapp.py", line 272, in doShare
File "jnius/jnius_export_class.pxi", line 1187, in jnius.JavaMultipleMethod.__call__
File "jnius/jnius_export_class.pxi", line 897, in jnius.JavaMethod.__call__
File "jnius/jnius_export_class.pxi", line 991, in jnius.JavaMethod.call_method
File "jnius/jnius_utils.pxi", line 79, in jnius.check_exception
jnius.JavaException: JVM exception occurred: java.lang.RuntimeException: Failure from system
java.lang.RuntimeException: Failure from system
android.app.Instrumentation.execStartActivity(Instrumentation.java:2002)
android.app.Activity.startActivityForResult(Activity.java:6133)
android.app.Activity.startActivityForResult(Activity.java:6090)
android.app.Activity.startActivity(Activity.java:6597)
android.app.Activity.startActivity(Activity.java:6564)
org.qtproject.qt.android.QtNative.startQtApplication(Native Method)
org.qtproject.qt.android.QtNative$$ExternalSyntheticLambda5.run(D8$$SyntheticClass:0)
org.qtproject.qt.android.QtThread$1.run(QtThread.java:25)
java.lang.Thread.run(Thread.java:1572)
Caused by:
android.os.TransactionTooLargeException: data parcel size 1422480 bytes
android.os.BinderProxy.transactNative(Native Method)
android.os.BinderProxy.transact(BinderProxy.java:595)
android.app.IActivityTaskManager$Stub$Proxy.startActivity(IActivityTaskManager.java:2329)
android.app.Instrumentation.execStartActivity(Instrumentation.java:1995)
android.app.Activity.startActivityForResult(Activity.java:6133)
android.app.Activity.startActivityForResult(Activity.java:6090)
android.app.Activity.startActivity(Activity.java:6597)
android.app.Activity.startActivity(Activity.java:6564)
org.qtproject.qt.android.QtNative.startQtApplication(Native Method)
org.qtproject.qt.android.QtNative$$ExternalSyntheticLambda5.run(D8$$SyntheticClass:0)
org.qtproject.qt.android.QtThread$1.run(QtThread.java:25)
java.lang.Thread.run(Thread.java:1572)
Related https://github.com/spesmilo/electrum/issues/4686#issuecomment-4953025969
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with app/electrum/gui/qml/qeapp.py and the doShare entry point shown in the traceback; inspect how large PSBTs are passed to Android. Reproduce the problem with a PSBT over 1 MB, then verify that sharing or exporting it no longer raises TransactionTooLargeException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, python
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100