superlistapp / super_native_extensions

Native drag & drop, clipboard access and context menu.
MIT License
364 stars 56 forks source link

[iOS] Error when accessing DataReader #311

Closed EgorK0rshun closed 3 months ago

EgorK0rshun commented 3 months ago

Only in release mode. On build from TestFlight it is always reproduced

Invalid argument(s): Failed to lookup symbol 'super_native_extensions_init_message_channel_context': dlsym(RTLD_DEFAULT, super_native_extensions_init_message_channel_context): symbol not found

https://github.com/superlistapp/super_native_extensions/issues/309#issuecomment-1932769768

knopp commented 3 months ago

This might be related to a particular applications. Can you check the binary uploaded to testflight, look at the libsuper_native_extension.so inside, list the symbols (using nm) and find out if super_native_extensions_init_message_channel_context is there?

stepushchik commented 3 months ago

There no .so files in TestFlight version, we have .../Products/Applications/Runner.app/Frameworks/App.framework/App file and

ïæ≤æ.22”£˛r ,TextInputConfiguration2‚•˛p6>2B5=L2”¶˛T,_setVisible@13643962352‚¶˛6C"2“™˛(get:isDelete2‘±˛∫)J_shouldAnimateNoteDeletion@10283043362‰≤˛‘&.J7AB0=>2O20=5 =0 40==82÷¥˛Ã>ê__TabBackupSyncIconState&State&SingleTickerProviderStateMixin@10372236992”∑˛¯;,RawReceivePort_factory2‚∫˛Iskoaeno2”æ˛¢6"get:configuration2“√˛8ImageFormat.2‚≈˛†<:2V2“œ˛æ4SpringType2‚–˛Ã+A5=BO1@O2’—˛ hsuper_native_extensions_init_message_channel_context2“’˛5 _sendOOB@10262482’÷˛|h_FlutterError&Error&DiagnosticableTreeMixin@400226082“◊˛z:H:mm2‘Ÿ˛∆ Zget:_handleMoveCursorBackwardByWord@3672456032”⁄˛d2:application/vnd.clonk.c4group2“€˛Ó"isSuccess2“‡˛T<Alignment(2“·˛∆$Az ÷n neve:2”„˛ƒ4Cau $modalRouteContentName2“²H0cacute;2‘Ê˛∫NLottie only supports bodymovin >= 4.4.02”Ê˛66SceneBuilder::pushClipRRect2“Ì˛Ï,\\(\S)2“Ì˛$(&sscr;2“Ô˛|°Entendido!2“˛^stickerType2‚˛ƒ2”Ô˛$0,trackAddBackgroundSave2”Ô˛x>application/vnd.mozilla.xul+xml2“˙˛Œ#FrameRate(2‚˛˛∫2ÿ∞›2‚ˇ˛*ê"82‚ˇ¿X2”ˇ40_lengthFromPath@140693162‚ˇ22“ˇ¨%Action2“
ˇ~rootNavigator2“ˇ2 EEE, y-M-d2”ˇB+.get:onboardingTipsTitle2‚ˇX
Ç

in it.

EgorK0rshun commented 3 months ago

it looks like super_native_extensions_init_message_channel_context2 . Maybe problem in 2?

stepushchik commented 3 months ago

Screenshot 2024-02-09 at 12 58 10 PM

knopp commented 3 months ago

Sorry, I meant dylib. There should be a dylib super_native_extensions framework. Using the nm command you should be able to list all symbols inside.

knopp commented 3 months ago

Note that the dylib does not have an extension. It's the binary file in the root of the framework.

stepushchik commented 3 months ago

There is no super_native_extensions dylib in Frameworks Screenshot 2024-02-12 at 5 35 20 PM

stepushchik commented 3 months ago

We have some mentions of super_native_extensions in App, but nm -gD App output:

App:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: error: App: File format has no dynamic symbol table

and nm App output:

App:
00000000005e6c40 S _kDartIsolateSnapshotData
000000000000e340 T _kDartIsolateSnapshotInstructions
00000000005de340 S _kDartVmSnapshotData
0000000000004000 T _kDartVmSnapshotInstructions
                 U dyld_stub_binder
knopp commented 3 months ago

There don't seem to be any frameworks from other flutter plugins. Is super_native_extensions only flutter plugin that you're using?

stepushchik commented 3 months ago

We are using a lot of other plugins and there are mentions of them in App For example, sqflite: Screenshot 2024-02-12 at 5 43 49 PM

stepushchik commented 3 months ago

Also we have

flutter_ios_podfile_setup

target 'Runner' do
  platform :ios, '13.0'
  use_frameworks! :linkage => :static
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))

end

in Podfile

knopp commented 3 months ago
use_frameworks! :linkage => :static`

super_native_extensions does not support static linkage. What reason do you have for using static linkage?

stepushchik commented 3 months ago

I have removed :linkage => :static. It was added for unknown reason from previous project (maybe due to old dependencies). Everything works OK.

Thanks for your time and for super_native_extensions!