flutter-rsa
flutter-rsa copied to clipboard
Failed to lookup symbol 'RSABridgeCall': dlsym(RTLD_DEFAULT, RSABridgeCall): symbol not found
When I use the Flutter project to sign the plugin for example:
RSA.signPKCS1v15bytes (signData, fastRsa. Hash.SHA256, pemPrivate Key)
The following error message appears
Failed to lookup symbol 'RSABridgeCall': dlsym(RTLD_DEFAULT, RSABridgeCall): symbol not found
This error only occurs on the IOS platform and does not occur on the Android platform
- Xcode version:15.3
- IOS version: eighteen point three
- fluter version:3.19.6
- fast_rsa: ^3.6.6
I am wondering if the conflict occurred due to the introduction of other plugins?
If you have any response, I would greatly appreciate it
I'm seeing the same issue when building with FlutterFlow:
[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: Invalid argument(s): Failed to lookup symbol 'RSABridgeCall': dlsym(RTLD_DEFAULT, RSABridgeCall): symbol not found
Same on 3.8.3. It looks like this happens only for iOS:
Invalid argument(s): Failed to lookup symbol 'RSABridgeCall': dlsym(RTLD_DEFAULT, RSABridgeCall): symbol not found
#0 DynamicLibrary.lookup (dart:ffi-patch/ffi_dynamic_library_patch.dart:33)
#1 Binding._library= (package:fast_rsa/bridge/binding.dart)
#2 new Binding._internal (package:fast_rsa/bridge/binding.dart:29)
#3 Binding._instance (package:fast_rsa/bridge/binding.dart:18)
#4 RSABridge.bindingEnabled (package:fast_rsa/fast_rsa_bridge.dart)
#5 RSABridge.call (package:fast_rsa/fast_rsa_bridge.dart)
#6 RSA.decryptPrivateKey (package:fast_rsa/fast_rsa.dart:160)
It was reproduced by one of our testers on his iOS device. However, I was not able to reproduce with the same private key and password on my device and on the Simulator.
This is not happening on version 3.6.3.
UPDATE: I was able to reproduce when building the app for iOS in release mode on 3.8.3. Version 3.8.2 doesn't have this problem
Yes, we had to downgrade for this issue.
Hi everyone,
so after some digging, it seems the code gets stripped away, as of missing a reference in code (it is only called via dlsym reflection).
There are thre options, two of them as workaround, from least favourable to desired:
-
Option: in Target 'Runner'/Build Settings/Linkage - General/Dead Code Stripping Change YES to NO Unfavourable
-
Option: Create an m.file with
//
// keeprsa.m
// Runner
//
// Created by trauma-and-drama on 15.05.2025.
//
#import <RSABridge/librsa_bridge.h>
// Trick to prevent RSABridgeCall from being stripped in release mode
__attribute__((used)) static void _keep_RSABridgeCall() {
RSABridgeCall(NULL, NULL, 0);
}
Mind the attribute __attribute__((used)) which prevents stripping. No further reference required, just put it in your Runner folder, where appDelegate.swift is located.
- Option: and most favorable:
RSABridgeCallthe pod needs to be updated with that attribute to prevent stripping.
Hope that helped. It was the only solution that helped me regardless of version.
Hi @trauma-and-drama thanks for sharing this, I'm going to include it in the next version to prevent stripping
Dear @jerson ,
I had no luck making my proposal work in Testflight, while it only worked in local release.
It seems like the Appstore processing strips away like a mofo. Even though having a mock call in swift in the AppDelegate _ = RSABridge.RSAEncodeText(nil, nil) did not help.
The only thing that helped was the first option.
Strip linked Product = NO Strip Style NonGlobalSymbols Dead Code Stripping = false
Not sure what is happening.
fast_rsa: ^3.6.6
When using flutter run --debug Everything is OK
When using flutter run --profile
catch: Invalid argument(s): Failed to lookup symbol 'RSABridgeCall': dlsym(RTLD_DEFAULT, RSABridgeCall): symbol not found.
I just released a new version fixing the Failed to lookup symbol 'RSABridgeCall' in profile mode please take a look https://pub.dev/packages/fast_rsa/versions/3.8.4
This issue still facing in TestFlight build (release and debug mode all things are working fine but issue in TestFlight build [] am using https://pub.dev/packages/fast_rsa/versions/3.8.5 I got same message '[Failed to lookup symbol 'RSABridgeCall': dlsym(RTLD_DEFAULT, RSABridgeCall): symbol not found]'. Android all things are working fine . my flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.32.3, on macOS 15.5 24F74 darwin-arm64, locale en-US) [✓] Android toolchain - develop for Android devices (Android SDK version 35.0.1) [✓] Xcode - develop for iOS and macOS (Xcode 16.4) [✓] Chrome - develop for the web [✓] Android Studio (version 2024.3) [✓] VS Code (version 1.100.3) [✓] Connected device (3 available) ! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27) [✓] Network resources
• No issues found!
We're successfully using fast_rsa version 3.6.2. Is there any specific reason to upgrade?
@delfme Thanks, the app is working correctly in TestFlight with fast_rsa version 3.6.2
Same here using 3.8.6 but still having the same issue, had to downgrade to 3.6.2
Just wanted to see if anyone was able to get the latest code (3.8.5) working on TestFlight builds. I'm running into the same issue (and am unable to use the older versions).
FYI, I'm able to replicate this issue with the example project in the repo when archiving to TestFlight, and when changing the "Stripe Style" build setting from "All Symbols" to "Non-Global Symbols", the issue goes away. Note this is on version 3.8.5.
Still experiencing the same issue on 3.8.5. Are there any updates?
same issue i face on test flight with the latest version of fast_rsa (3.8.5) not working on TestFlight builds. while test release without testflight work fine .
I faced the same issue, and I had to replace fast_rsa with encrypt and pointycastle for RSA encryption to fix it.
I tried versions 3.8.4, 3.8.5, and 3.6.2, but the issue still persists.
Tested several versions and can confirm that the issue appears in version 3.8.3. Downgraded to 3.8.2 for now.
I have released a new version which may fix issue, https://pub.dev/packages/fast_rsa/versions/3.8.6 is using force load like 3.8.2 or previous versions
I have released a new version which may fix issue, https://pub.dev/packages/fast_rsa/versions/3.8.6 is using force load like 3.8.2 or previous versions
I got the same error on 3.8.6. We downgraded to 3.6.3 and now it works.