flutter 3.3 ShaderCompilerException ink_sparkle.frag failed with exit code -1073740791 - windows

Since updating my flutter to 3.3+ everytime I try to build my project there is this error on the console:
Target web_release_bundle failed: ShaderCompilerException: Shader compilation of
"C:\flutter\packages\flutter\lib\src\material\shaders\ink_sparkle.frag" to "build\web\assets\shaders/ink_sparkle.frag"
failed with exit code -1073740791.
Compiling lib\main.dart for the Web... 52,1s
Exception: Failed to compile application for the Web.
I've tried running flutter clean, deleting the project and downloading it again from github, clearing pub-cache from c:\flutter folder and also deleting flutter and installing it again but nothing worked

If you are using a mac try to open 'Security & Privacy' and give permission to the app that requests it.
It may seem out of context. But it worked for me!

This error is present since 3.3.0 and until today (3.3.2), it wasn't fixed... but there are some workarounds:
1- Downgrade flutter to 3.0.5 (some updates to the libs you use won't be avaliable as they are migrating to 3.3+)
2- They are currently tracking the issue on github and the 'temp fix' is checking if your project is in a folder with a utf8 character (like 'â', 'Á' and maybe some chinese or japanese characters) and moving it to a folder only with ASCII characters.
Ex:
from -> C:\Users\user\Área de Trabalho\
to -> C:\Users\user\

Related

how to fix Archive Runner fail in flutter?

I made an app using a flutter and I want to distribute it to the app store. However, if I run archive, It has fail.
flutter clean
flutter getpackage
flutter upgrade and update
product clean in xcode
but I has success product -> build
just when I distribute the app to archive. I got fails...
Building AOT snapshot in release mode (ios-release)...
Dart snapshot generator failed with exit code -9
Building AOT snapshot in release mode (ios-release)... 309.0s (!)
Built to build/aot/.
Snapshotting (IOSArch.arm64) exited with non-zero exit code: -9
cp: build/aot/App.framework: No such file or directory
error: cannot parse the debug map for 'build/aot/App.framework/App': No such file or directory
Failed to generate debug symbols (dSYM) file for build/aot/App.framework/App.
You need to run "flutter build ios" before use the code in Xcode
Check the docs: https://flutter.dev/docs/deployment/ios
I solved this problem.
I made so many .dart files
so I spend a lot of time doing compile.
the problem is that there are many dart files
We need to reduce the dart file.
I built the release version and it was successful, leaving only the main files behind.
So the unnecessary dart file was erased and the build was successful.
But I don't think this is a fundamental solution.
I will continue to develop and make dart files. Then you'll face a situation where you don't build again.

Can't find React native project on iOS Simulator or Xcode project

I have deleted my project on Xcode may it be .xcworkspace or .xcodeproj.
Because of that, I had to delete IOS and android folders while downgrading, updating and re-upgrading my react version to re-install IOS and android folders.
Thanks to that the emulator is working but unfortunately the project isn't present in the emulator and is still absent with Xcode. One thing to point out is that the simulator only appears when ran in the integrated terminal and nor in general terminal after cd-ing in the project folder.
Can anyone please help re-integrating the project in the emulator and on Xcode, please.
Here is the error when the emulator is running in a general terminal:
Here is the error when the emulator is running in a general terminal:
error Command failed: xcrun instruments -s
xcrun: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk' (errno=No such file or directory)
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH
Here is the error for building the project within emulator when ran from VS code integrated terminal:
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening project.xcodeproj
The process you need to follow is so similar to renaming a react native app. Basically you just need to run react-native upgrade in your root project directory. For further info you can check another question here. The instructions below explains how to create another react native project based on a copied one with a new name.
First copy the directory which your to-be-name-changed application exists. And go to your newly cloned directory.
Change the name at index.ios/android.js file which is given as a parameter to AppRegistry.
Change the name and version accordingly on package.json
Delete /ios and /android folders which are remaining from your older app.
Run $react-native upgrade to generate /ios and /android folders again.
Run $react-native link for any native dependency.
Finally run $react-native run-ios or anything you want.
Courtesy of
https://stackoverflow.com/questions/42506068/how-can-i-regenerate-ios-folder-in-react-native-project

Unable to run app on simulator

When I try to run the project in simulator, I get the error:
Failed to create plugin placeholder for
/Users/zc/Library/Developer/Xcode/DerivedData/iPhoneHandheldACT-cwlfykavlwlqwlhbecjubziblyzi/Build/Products/Debug-iphonesimulator/iPhoneHandheldACT.app/PlugIns/CallerID.appex
The build is successful, but run gives me the error.
This happened after I started re-organising the files in my project.
I tried deleting the derived data, clean and restarting the Xcode but it didn't help.
Removing the CallerID.apex from the embed framework section in Build Settings fixed this error.
For me the issue was that the version and bundle version of my widget configuration intent target didn't match the versions of the widget and the app.

Error while sending a build of parse4cn1 application for device

I am experiencing some problems building for iOS (Debug).
Steps to reproduce:
Create a new CN1 project. Send iOS build -> no errors.
Drag parse4cn1.cn1lib into the lib folder -> iOS build fails with "java.lang.UnsupportedClassVersionError: com/moe/ibuddy2/iBuddyApplication : Unsupported major.minor version 52.0".
Some googling reveals that this may mean that JDK 1.8 isn't supported. Therefore, I edit build.xml, replacing "1.8" with "1.7" everywhere.
When I send the iOS build now, the error message is "/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build2564350766160402235xxx/dist/iBuddyApplication-src/com_parse4cn1_nativeinterface_Utils.m:3:9: fatal error: 'com_parse4cn1_ParsePush.h' file not found"
There are no problems running the simulator or building for Android.
The problem is not the JDK version (so please don't change it in build.xml). I think the actual issue is the 'file not found' error which is caused by stripping out of unused classes/methods by the CN1 build server. In this case, ParsePush is detected as a false positive (because it is actually used in the iOS native code and should not be stripped out).
The problem has been fixed in parse4cn1 version 2.0.1 which is available on github. Please try with that version.

'hello/Hello.h' file not found - Trying to build/run iOS gomobile Hello app

I am building the gomobile Hello example app, but am running into the following problem: When trying to build and run the app after opening it in Xcode (7.1), I get the error 'hello/Hello.h' file not found'
From what I can tell, Hello.h is in fact in the hello folder of the native directory.
Following this discussion on Github, it seems like this is due to a recent change in the way Xcode 7 updates paths for the headers.
The proposed solution is to check Copy items if needed when importing the framework:
I can confirm that this fixes the issue. But note that you would then need to re-import the framework every time you make changes and build the go code.

Resources