Phantom iOS deeplink signAndSendTransaction errorCode=-32603 #448
Replies: 1 comment
-
| Hey @HuberyQing! We have announced changes to deeplink and signAndSendTransaction here https://github.com/orgs/phantom/discussions/449 Also, while there’s no hard limit on deeplink URL length, iOS may impose practical limits around 2,000 characters, so keeping it under ~1,500 is generally safe. | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Hi Phantom Team,
I am developing a third-party iOS app and trying to implement SOL transfer using the signAndSendTransaction deeplink flow.
However, when I build the transaction locally (in base64 format) and invoke Phantom via deeplink, I consistently receive the following callback:
arduino
wallet-demo://phantom-callback?errorCode=-32603&errorMessage=Unexpected+error
✅ My setup:
Network: mainnet-beta
Wallet address:
Transfer amount: 0.0001 SOL
Destination address:
Transaction is serialized using SolanaTransactionManager (compatible with Solana.Swift format)
Base64-encoded transaction:
(truncated) AQABA+9PlUemkgy9+4tU3Vb8uQfb4w7GBTjW2v1mhxemLcwZ...
deeplink URL length: 970 chars
🔍 What I’ve verified:
✅ Transaction is correctly constructed and serialized (can decode and inspect base58)
✅ feePayer, recentBlockhash, and from are all set properly
✅ Phantom is launched and user can interact, but signs fail
✅ Using mainnet-beta RPC endpoint: https://api.mainnet-beta.solana.com
✅ dapp_encryption_public_key and nonce are generated with TweetNacl
✅ I’ve tried reducing URL length and simplifying transaction, no luck
❓ Questions:
Is there a limit on transaction size or URL length for Phantom deeplink handling on iOS?
Does signAndSendTransaction only support transactions constructed in a certain structure (e.g., with specific field order or default empty signatures)?
Are there any restrictions on encoding or encryption used for the deeplink payload?
If needed, I can provide the full transaction payload and logs for debugging.
Any help would be greatly appreciated!
Thanks,
Example
No response
Steps to Reproduce
In a third-party iOS app, manually construct a Solana native transfer transaction without using Solana.Swift:
from:
to:
amount: 0.0001 SOL (i.e. 100,000 lamports)
recentBlockhash: obtained via RPC endpoint https://api.mainnet-beta.solana.com
feePayer: same as from
Build the unsigned transaction, serialize it to base64 format. Example:
AQABA+9PlUemkgy9+4tU3Vb8uQfb4w7GBTjW2v1mhxemLcwZ8m98N7rBBOzsDy/11RkGRSpTqeEeOz8OHCFwc5NZJ2UAAAA...
Byte length: 150
Base58 length: 204
Encrypt the transaction using a custom encryption module based on TweetNaCl, then generate the Phantom deeplink URL as follows:
bash
复制
编辑
https://phantom.app/ul/v1/signAndSendTransaction?
dapp_encryption_public_key=...
&nonce=...
&redirect_link=wallet-demo%3A%2F%2Fphantom-callback
&transaction=... // base64 encoded transaction
Open the deeplink via UIApplication.shared.open(URL).
Phantom wallet successfully opens and displays the transaction confirmation screen.
After user confirms the transaction, Phantom returns the callback URL:
arduino
wallet-demo://phantom-callback?errorCode=-32603&errorMessage=Unexpected+error
Additional Information
Phantom environment: latest iOS app version (mainnet network)
Network: Mainnet Beta
Transaction is unsigned; signing is delegated to Phantom
Encryption uses TweetNaCl with correct base58 public key, random nonce, and properly encoded redirect link
Phantom deeplink URL length is about 970 characters
The transaction is a standard SOL transfer with no additional instructions
Phantom Version
No response
Is there an existing discussion for this?
Beta Was this translation helpful? Give feedback.
All reactions