Open shaheer20 opened 1 year ago
can you maybe show more code? it is hard to tell whats wrong from this snippet
@gregorscholz This where I am getting the issue.
Now i am getting this Error in catch: 'error while loading invalid arguments(s): Failed to lookup symbol 'TfLiteModelCreate': dlsym(RTLD_DEFAULT, TfLiteModelCreate): symbol not found'
Did you double check if the model is correct? Maybe there is some error with the model?
It is working fine on Android and IOS (debug) . The issue only occurs in the build i download from test flight for IOS.
Oh sorry, yea, mb. I think i've read some time back someone had also problems with ios release build while it worked in debug. I will try to find it
Edit: Maybe one of those can help https://github.com/shaqian/flutter_tflite/issues/171#issuecomment-929597880 https://github.com/tensorflow/tensorflow/issues/49897#issuecomment-850914325
Thanks for the links.
https://github.com/shaqian/flutter_tflite/issues/171#issuecomment-929597880: This is showing how can i load the model. I don't have any issue with loading the model it just happens when I pass model to Interpreter. I have tried to get the model into a file and check the size that shows I am getting the right file and there is no issue in getting the file.
https://github.com/tensorflow/tensorflow/issues/49897#issuecomment-850914325: This example shows an error while compiling I only get an error when I run the app on an IOS device in release (From test flight).
Was a solution found to this? I’m facing the same issues. Works fine in debug but release doesn’t on TestFlight
Not yet. Did you try the below solution is any one of this works for you? https://github.com/shaqian/flutter_tflite/issues/171#issuecomment-929597880 https://github.com/tensorflow/tensorflow/issues/49897#issuecomment-850914325
@shaheer20 Did you follow this step: https://github.com/tensorflow/flutter-tflite#android--ios
Specifically:
When creating a release archive (IPA), the symbols are stripped by Xcode, so the command flutter build ipa may throw a Failed to lookup symbol ... symbol not found error. To work around this:
In Xcode, go to Target Runner > Build Settings > Strip Style Change from All Symbols to Non-Global Symbols
I had a similar issue recently and that was the solution.
@kvanry Thanks it works fine by changing All Symbols to Non-Global Symbols. But It's not working on iPhone 7.
@PaulTR FireStore recommends statically linked libraries, is there a plan to make a more robust fix for this for better integration with other google products?
Hello. I have a similar problem in 2024. Everything works in the debug version, but the release version does't work. Xcode does't add the framework to the ipa file.
I'm using the latest version of tflite_flutter: ^0.10.4 Options: Strip Style = Non-Global Symbols Strip Linked Product = No
MacBook Pro Apple M1 Pro Sonoma 14.3 (23D56) Xcode Version 15.2 (15C500b)
I also tried adding frameworks manually. They are added to the ipa package, but the package cannot be installed or uploaded to TestFly.
Asset validation failed Invalid Bundle. The bundle Runner.app/Frameworks/TensorFlowLite.framework does not support the minimum OS Version specified in the Info.plist. (ID: 8c2faa9d-72b6-4024-b1b2-4849a7aa2afe)
What am I doing wrong in my life? :) Thanks in advance for your help.
@gregorscholz This where I am getting the issue.
Now i am getting this Error in catch: 'error while loading invalid arguments(s): Failed to lookup symbol 'TfLiteModelCreate': dlsym(RTLD_DEFAULT, TfLiteModelCreate): symbol not found'
For this issue issue you need to change XCode settings under the Target Runner. Follow the below 2 simple steps and your app will start to working in released mode also.
Step 1: In Xcode, go to Target Runner > Build Settings > Strip Style Step 2: Change from All Symbols to Non-Global Symbols
Hi @shaheer20 , Have you find our solution for your issue? I am facing same issue.Hello @cs-milan-sadariya, You provided solution not working.I am still facing "Failed to lookup symbol 'TfLiteModelCreate': dlsym(RTLD_DEFAULT, TfLiteModelCreate): symbol not found" for IOS
@gregorscholz This where I am getting the issue. Now i am getting this Error in catch: 'error while loading invalid arguments(s): Failed to lookup symbol 'TfLiteModelCreate': dlsym(RTLD_DEFAULT, TfLiteModelCreate): symbol not found'
For this issue issue you need to change XCode settings under the Target Runner. Follow the below 2 simple steps and your app will start to working in released mode also.
Step 1: In Xcode, go to Target Runner > Build Settings > Strip Style Step 2: Change from All Symbols to Non-Global Symbols
@SantroTechneAi try this solution it has worked for me and this solution is also available on flutter package code. Follow the below link: tflite_flutter
same problem in release from TestFlight Invalid argument(s): Failed to lookup symbol 'TfLiteModelCreate': dlsym(RTLD_DEFAULT, TfLiteModelCreate): symbol not found
it is working
In Xcode, go to Target Runner > Build Settings > Strip Style
Change from All Symbols to Non-Global Symbols
I am passing the tflite file to the interpreter but it returns nothing. This is only happening when I download the IOS build from a test flight. Running an app with IDE works fine.
tfl.Interpreter? interpreter = await tfl.Interpreter.fromAsset('assets/config/mobilefacenet.tflite');
I have also tried
tfl.Interpreter.fromFile(File(path));
But this also doesn't return anything.
How I am testing: I have added a stack view with a Text widget on that and added logs into a string and print the text to check which line is executed. I am not getting any error even if I add this interpreter into try-catch. I have added a text before assigning the value to the interpreter and after the value is assigned to the interpreter only the before-added text shows not after one. This is why I am assuming it got stuck while assigning and didn't return anything.