Pub error: Pub build failed, [255] Wrong script snapshot version - dart

I have started getting this issue now after going through a lot of "chaos" with performing a system restore (I'm on Win8.1) while trying to get a certain game working again. Now that that mess is over and done with, I have been left with a few apps and such removed and needing to be reinstalled, including the JDK which I have already reinstalled. Since I have a project I need to work on I opened up DartEditor again and when I tried to do pub build I get this error:
Pub build failed, [255] Wrong script snapshot version, expected
'f6711525cff9f7d0d08595166664b767' found '836a274342f7f88d6b5a9bb59b2649a9'
Googling led me to this old issue but that's labelled as fixed...what could be going wrong here?

Ok, so deleting the dart directory (the one with the editor executable, relevant .jar files and all that other stuff) and downloading it anew did resolve my issue. I'm curious though as to whether anyone knows what might have caused the issue, and/or what other things I might have been able to do to resolve it.

Related

compileKotlinIos FAILED - Could not find stdlib

I am trying to compile kotlin multiplatform, which contains iOS target.
I tried different examples over github, but most of them are outdated and don't work, probably because of incompatibility with current tools. Thing, that seems most reasonable is creating Mobile Android/iOS | Gradle or Mobile Shared Library | Gradle project using IntelliJ Idea.
When I create brand new project, I am still getting same error:
> Task :app:compileKotlinIos FAILED
e: Could not find "stdlib" in [~/git/iosandroidtest, ~/.konan/klib, ~/.konan/kotlin-native-macos-1.3.61/klib/common, ~/.konan/kotlin-native-macos-1.3.61/klib/platform/ios_x64].
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileKotlinIos'.
> Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
I am using kotlin 1.3.61, xcode 11.3. Any ideas?
Edit:
I pushed empty project (without any changes from me) to github:
https://github.com/hovi/iostest
I think you just ran into a bug with partial archive download.
Per the author there, "I got a snapshot of the .konan directory. It's interesting as it looks like part of the runtime download is there, but some parts are missing. Specifically in this case the common folder in klib, but also the licenses folder.
I was able to repro this locally by killing the build process while the archive is being extracted. For reference, see NativeCompilerDownloader. It looks to see if the folder is there. If not, it'll download and extract. If yes, the build process assumes everything is OK. ... Their local build will certainly be broken from then on until they clean and rebuild ~.konan." I suggest you report your issue there as well. (btw - tried your project in IJ and AS (as well as creating new lib project in IJ), didn't have any issues. Somehow your bad luck with an interrupted download (:))
Link to GitHub issue

installReactHook is not a function / installReactHook is undefined

Suddenly I can't get my react native project to start on ios simulator or device. I don't know what happened in between. I tried to clear all cache, reinstalled the node modules, pod install, but nothing works. Can't find anything except that in the react native documentation that this is part of Systrace. I'm stumped.
I did run npm link yesterday - maybe it messed something up, but still after that building was not an issue.
I'm sure i messed something up myself, but hopefully someone has a hint.
Not sure this will help, but sometimes cleaning the ios build folder fixes weird things
This was a bit of a headache.
I also saw the error Module AppRegistry is not a registered callable module (calling runApplication). But that was not really the issue.
Whilst checking if android build has similar problem, I found that the module react-native-animated-linear-gradient had two issues
It gave problems with ReactNativeFeatureFlags.js.
It had a duplicate definition of react-native (as if it also included the whole react-native project through its package.json
By continuing to remove this package completely, unlinking it manually, reinstalling npm packages and cleaning my npm cache I finally got it to work again, both on android and ios.
I wasn't using that package, but due to lingering in my package.json and running npm update it went and broke something in my setup I suspect. If only I had removed it completely after not testing and deciding not using it.
I hope it helps people giving direction if you suddenly see installreacthook not found. It costs me 4 hours to figure out.

when building an ionic app files and folders starting with "._" are created until error

I have a strange problem. I develop an app using Ionic on a samba network drive.
I develop on a windows machine and run all the command lines regarding Android development. I switch to a Mac to be able to build for iOS.
All went fine and as expected the last couple of days. Today I edited some HTML, JS and CSS files - just some minor improvements. I built the app for android on the windows machine (plus using jarsigner and zipalign - only if that should matter).
On the Mac I had troubles. Suddenly I get errors when trying to run ionic build --release ios (as I already did successfully the last couple days).
The executed script creates files and folders starting with "._" which were never created before and are already existing without it. This results at some point in an ENOENT (no such file or directory) aborting everything.
I don't get it. I already de-/re-installed node, npm, cordova and ionic. But nothing helped.
I would love to support you guys with additional error messages or logs, but due to I'm fairly new to mobile development (and using a Mac), I don't know what information would be helpful and what not.
Sp please tell me any information you need and I'll be happy to supply them.
I accidentally solved my own problem. I just "removed" the platforms directory (by renaming it) and re-added the platform using the command cordova platform add ios.
After that I could build my app as it did before. Don't know why or what actually triggered this behavior, but at least I'm able to proceed.
If somebody knows how to prevent that from happening again (so that I don't loose all the project settings I configured in Xcode), I would appreciate it.
This happened to me, too - I found this bug in the Cordova issues:
https://issues.apache.org/jira/browse/CB-5644
I found out that Xcode created the file PROJECT_PATH/platforms/ios/._APPNAME.xcodeproject. I deleted this file and "cordova prepared ios" was working again.
...
It should ignore files starting with ._ as they are hidden system
files used by osx to store infos about a file

Xcode 6 build failing with missing Info.plist file

I've got a project that I've been working on for a number of years, and everything was going really well making some changes this afternoon, until…
Xcode has stopped compiling the application. It's an ObjC application for the iPad. I get a Shell Script Invocation Error:
Source is /Users/andrew/Developer/SalesIQ/SalesIQ/SalesIQ/SalesIQ-Info.plist
Build is /Users/andrew/Library/Developer/Xcode/DerivedData/SalesIQ-cflsbctuolgqvpbqmuzvrkuopvkl/Build/Products/Debug-iphonesimulator/SalesIQ.app/Info.plist
missing file /Users/andrew/Library/Developer/Xcode/DerivedData/SalesIQ-cflsbctuolgqvpbqmuzvrkuopvkl/Build/Products/Debug-iphonesimulator/SalesIQ.app/Info.plist
Command /bin/sh failed with exit code 1
I've even tried checking out an earlier version of the application and I still get the same error, which confuses me.
Can anyone nudge me in the right direction?
Edit: I should note that I've done a clean and build. I've rebooted. I've tried Xcode 6.0 and the 6.1 beta, and no matter what I do this error is still there.
The missing file warning is misleading. For some unknown reason, a custom script that was run during the build was failing. I deleted the Run Script task, then added it back in, and it's all good.
Weird…

Cannot find referenced source: package:web_ui/web_ui.dart

I have a project that uses Dart and the web_ui package. I just upgraded Dart to libv2, specifically:
Dart Editor version 0.3.1_r17594
Dart SDK version 0.3.1.3_r17594
I just updated web_ui to 0.3.0+2.
Now, I'm getting these errors:
Cannot find referenced source: package:web_ui/web_ui.dart
no such type "WebComponent"
"ChatWindowComponent" has no method named "dispatch"
When I run my build.dart, it completes successfully, but it doesn't create an out directory. Nor does it give any error messages.
What's going on? Why can't it find package:web_ui/web_ui.dart? I can clearly see that pub has set stuff up correctly.
It's a known issue. See http://code.google.com/p/dart/issues/detail?id=7822. The issue was closed today. I tried out a continuous build of Dart Editor, but that lead to different errors--I'll save that for another question.
When I run my build.dart, it completes successfully, but it doesn't create an out directory. Nor does it give any error messages.
I run the editor with 'automatically run pub' disabled. Creating a new web ui projects yields a few errors, after installing pub the errors are gone, but the timestamps of the files are to old now.
I changed the file that was to build and the out directory appeared immediately.

Resources