General Troubleshooting Steps
Before diving into specific issues, try these general troubleshooting steps:-
Clean the project and get dependencies:
-
Update Flutter and dependencies:
-
Ensure Para package is up to date: Check your
pubspec.yamlfile and update the Para package version if necessary. -
Rebuild the project:
Common Issues and Solutions
1. Package Not Found or Version Conflicts
Problem: Dart can’t find the Para package or there are version conflicts with other dependencies. Solution: Ensure yourpubspec.yaml file is correctly configured:
pubspec.yaml, run:
2. Platform-Specific Setup Issues
Problem: Para features not working on specific platforms (iOS/Android). Solution: Ensure platform-specific configurations are correct: For iOS (ios/Runner/Info.plist):
android/app/build.gradle):
3. SDK Initialization Errors
Problem: Para fails to initialize or throws errors on startup. Solution: Ensure proper initialization with requiredappScheme parameter:
- Missing
appSchemeparameter - Incorrect environment configuration
- Invalid API key format
4. ParaFuture Handling Errors
Problem: Errors when handlingParaFuture operations.
Solution: Ensure proper ParaFuture handling with cancellation support:
- Not awaiting the
ParaFuture - Incorrect cancellation handling
- Missing error type checking for
ParaBridgeException
5. UI Thread Blocking
Problem: Para operations blocking the UI thread. Solution: Usecompute function for heavy computations:
6. Platform Channel Errors
Problem: Errors related to platform channel communication. Solution: Ensure the latest version of Para Flutter plugin is used and platform-specific code is correctly implemented. If issues persist, check the plugin’s GitHub repository for any known issues or updates.SDK-Specific Issues
7. Authentication Flow Errors
Problem: Authentication flow failing or returning unexpected states. Solution: Use the single-call methods, which run the whole sign-in and handle each stage for you:verificationCodeProvider is rethrown unchanged rather than as a ParaBridgeException. See Error codes for every code.
If you drive the stage-based flow yourself, pass the stage’s AuthState and your web authentication session:
8. OAuth Integration Issues
Problem: OAuth flows failing or not redirecting properly. Solution: Ensure thecallbackUrlScheme of your FlutterWebAuthSession and the appScheme you pass to Para.fromConfig match the URL scheme you configured for iOS and Android:
9. Passkey Belongs to a Different Account
Problem:ParaBridgeException with code passkey_account_mismatch: “That passkey belongs to a different account.”
Solution: During authenticateWithOAuth or authenticateWithEmailOrPhone, a returning user whose account is protected by a passkey can be handed back to your app to sign in with it. The passkey must belong to the account the user signed in to with the provider, or verified on the code page. The SDK discards that sign-in. Ask the user to pick the passkey for that account and try again.
10. External Wallet Sign-In Fails
Problem:authenticateWithExternalWallet throws after the wallet opens.
Solution: Confirm the address and type are correct, and that signMessage signs with that same address. For a Cosmos wallet, pass signCosmosMessage (the call throws missing_cosmos_signer without it). If the user rejects the signature in the wallet, your signMessage callback throws and sign-in is canceled. Make sure your deep link configuration returns the user from the wallet app to yours.
11. Two-Factor Authentication Required
Problem:ParaBridgeException with code two_factor_required: “This account requires two-factor authentication to sign in, which this sign-in flow can’t complete.”
Solution: The account must complete login two-factor authentication, which the stage-based sign-in methods and the wallet connectors’ connect() can’t host, so the SDK canceled the sign-in. Catch the code and tell the user. authenticateWithEmailOrPhone and authenticateWithOAuth complete the second factor on a Para-hosted page once Para’s updated authentication flow runs for your app.
12. Extension Methods Not Found
Problem:initiateAuthFlow() or other extension methods not available.
Solution: The auth extensions are exported from the main package import:
Error Codes
Most sign-in failures throw aParaBridgeException whose code tells you what happened:
Best Practices
-
Use ParaFuture Properly: Await the
ParaFuturedirectly and use itsrequestIdwithcancelOperationById()when you need to cancel. -
Error Handling: Implement robust error handling with specific exception types:
-
Session Management: Use session methods for persistence:
- State Management: Use proper state management for authentication flows.
- Deep Link Security: Validate deep link callbacks to prevent malicious redirects.
- Testing: Write unit and integration tests for your Para integration.
-
Performance Monitoring: Monitor
ParaFutureoperations for performance. - Keep Updated: Regularly update to the latest SDK changes.
Debugging Tips
-
Read Debug Logs: In debug builds, the SDK logs its operations (prefixed
Para:) to the Flutter console. - Use Flutter DevTools: Utilize Flutter DevTools for performance profiling and debugging.
- Platform-Specific Debugging: For platform-specific issues, use Xcode for iOS and Android Studio for Android debugging.
Setup and Integration Issues
Para SDK initialization fails
Para SDK initialization fails
If you’re having trouble initializing the Para SDK:
- Ensure you’re providing the required
appSchemeparameter - Verify that you’re using the correct API key and environment
- Check that all necessary dependencies are installed properly
- Look for any Dart errors in your Flutter debug console
- Verify that your Flutter version is compatible with the Para SDK
Passkey operations fail or throw errors
Passkey operations fail or throw errors
If passkey creation, retrieval, or usage isn’t working:
- Verify that you’ve set up associated domains correctly in your iOS project
- For Android, check that you’ve configured your
build.gradlefile with the namespace fix - Make sure you’ve provided the correct SHA-256 fingerprint to the Para team for Android
- Ensure that biometric authentication is enabled on the test device
- For Android, confirm the test device has a Google account signed in
- Check that your
FlutterWebAuthSession(aParaWebAuthenticationSession) uses your app’s URL scheme
Authentication fails or API requests are rejected
Authentication fails or API requests are rejected
If you’re experiencing authentication issues:
- Double-check that your API key is correct and properly set in your Para client initialization
- Verify you’re using the environment (
betaorprod) that matches your API key - Ensure your account has the necessary permissions for the operations you’re attempting
- Check that your deep link scheme matches what’s configured in your app
- Verify the authentication flow is being followed correctly (verify → signup/login)
Migrating from Earlier SDK Versions
Migrating from Earlier SDK Versions
If you’re upgrading from an earlier version of the Flutter SDK:
- Sign users in with
authenticateWithEmailOrPhone,authenticateWithOAuth, andauthenticateWithExternalWallet. They replace the stage-based calls (initiateAuthFlow,verifyOtp,handleLogin,handleSignup,verifyOAuth,loginExternalWallet), which keep working but don’t use Para’s updated authentication flow - Remove calls to
init()- it no longer exists - Update constructor to use
Para.fromConfig()factory method - Add the required
appSchemeparameter (now without ://callback suffix)
Integration Support
If you’re experiencing issues that aren’t resolved by our troubleshooting resources, please contact our team for assistance. To help us resolve your issue quickly, please include the following information in your request:- 1
A detailed description of the problem you’re encountering.
- 2
Any relevant error messages or logs.
- 3
Steps to reproduce the issue.
- 4
Details about your system or environment (e.g., device, operating system, software version).