Deploying a Rails app to fly.io and get an error. I suspect a corrupt file or something similar but do not understand what is being built at the moment of failure
=> ERROR [stage-4 5/5] RUN **bin/rails fly:build**
------
> [stage-4 5/5] RUN bin/rails fly:build:
#23 3.986 I, [2022-11-17T04:10:07.369515 #1] INFO -- : Writing /app/public/assets/manifest-59847e13867fe9a5a76887c0d0de1f7fb788ec2d1e3094037
<cut 30 lines>
#23 4.013 I, [2022-11-17T04:10:07.396376 #1] INFO -- : Writing /app/public/assets/activestorage.esm-01f58a45d77495cdfbdfcc872902a430426c4391
#23 4.484 Compiling...
#23 6.651 Compilation failed:
#23 6.651 Internal Error: root-workspace-0b6124#workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to
#23 6.651 at pQ.getCandidates (/root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:435:5146)
#23 6.651 at Wf.getCandidates (/root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:391:1264)
#23 6.651 at /root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:439:7695
#23 6.651 at Rf (/root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:390:8965)
#23 6.651 at ge (/root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:439:7675)
#23 6.651 at async Promise.allSettled (index 0)
#23 6.651 at async eo (/root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:390:8293)
#23 6.651 at async /root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:439:8205
#23 6.651 at async ni.startProgressPromise (/root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:390:45507)
#23 6.651 at async He.resolveEverything (/root/.volta/tools/image/yarn/3.3.0/bin/yarn.js:439:6238)
#23 6.651
------
Error failed to fetch an image or build from source: error building: executor failed running [/bin/bash -c bin/rails fly:build]: exit code: 1
I’ve yarn install many times. Deleted yarn.lock. Deleted node_modules. Removed and re-added some modules to shake something loose, but keep getting this error. Versions in fly.toml match Node, Ruby and Bundler.
Rails 7, Ruby 3.0.2 with webpacker. I just updated from Rails 6 and this app started in Rails 5 and there may be something misconfigured somewhere.
What is root-workspace?
I’m at a loss here. I have deployed one other app to fly successfully, but not this one.
Where else to look?
Related
aqueduct serve
-- Aqueduct CLI Version: 3.3.0+1
-- Aqueduct project version: 3.3.0+1
-- Preparing...
*** Uncaught error
Bad state: Package file 'file:///home/superuserfucker/Documents/Code/Flutter/srvrs/server/.packages' not found. Run 'pub get' and retry.
**** Stacktrace
#0 IsolateExecutor.execute (package:isolate_executor/src/executor.dart:25:7)
#1 IsolateExecutor.run (package:isolate_executor/src/executor.dart:94:21)
#2 CLIServer.deriveApplicationLibraryDetails (package:aqueduct/src/cli/commands/serve.dart:183:40)
#3 CLIServer.prepare (package:aqueduct/src/cli/commands/serve.dart:206:32)
#4 CLIServer.handle (package:aqueduct/src/cli/commands/serve.dart:87:11)
#5 CLICommand.process (package:aqueduct/src/cli/command.dart:159:20)
#6 main (file:///home/superuserfucker/.pub-cache/hosted/pub.dartlang.org/aqueduct-3.3.0+1/bin/aqueduct.dart:9:14)
App doesn't run on IOS simulators or building archive but runs on devices.
It used to run fine, suddenly (can't pinpoint what is currently different that could cause this) a similar issue happened on android with the File name is too long error after multiple flutter cleans, removing all caches it worked on a real device then on the simulators again, doesn't work for IOS though.
Error message
/Users/yassin/Library/Developer/Xcode/DerivedData/Runner-dnjtfjbcotehrpgzrmybaaeugzpl/Build/Intermediates.noindex/ArchiveIntermediates/Runner/InstallationBuildProductsLocation/Applications/Runner.app: File name too long Command CodeSign failed with a nonzero exit code
Unhandled error domain NSPOSIXErrorDomain, code 63
More details on the error when running from xcode for a simulator:
Failure Reason: Unhandled error domain NSPOSIXErrorDomain, code 63 User Info: { FunctionName = IXCopyItemAtURL; IDERunOperationFailingWorker = IDELaunchiPhoneSimulatorLauncher; SourceFileLine = 121; }
One weird behaviour i've noticed is that dart analysis is taking so long to launch, and when running on a device it builds in normal time but takes so long to install (4+ minutes) On a Macbook M1, on both android and ios which is something unusual.
Flutter doctor
[✓] Flutter (Channel stable, 2.5.3, on macOS 11.6 20G165 darwin-arm, locale
en-DE)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.61.0)
Things i have tried:
Flutter clean + Flutter pub get
Deleting xcodes derived data folder + Restarting laptop and xcode
flutter pub cache repair
Pod install, update
Revoking all certificates, installing new ones
Closing automatic signing, downloading profile
Locking & unlocking Keychain login access.
Flutter run --verbose error logs:
An error was encountered processing the command
(domain=NSPOSIXErrorDomain, code=63):
copyfile of
file:///Users/yassin/Desktop/Projects/handles/build/ios/ipho
nesimulator/Runner.app/ to
file:///Users/yassin/Library/Developer/CoreSimulator/Devices
/B864AB8C-79BE-4A09-9351-DDCA31E8C22F/data/Containers/Shared
/SystemGroup/systemgroup.com.apple.installcoordinationd/Libr
ary/InstallCoordination/PromiseStaging/C21EB07A-E655-4BBA-8B
07-5DA8B5397AE4/Runner.app failed: File name too long
Unhandled error domain NSPOSIXErrorDomain, code 63
[ +15 ms] Unable to install
/Users/yassin/Desktop/Projects/handles/build/ios/iphonesimulator/Runner.app on
B864AB8C-79BE-4A09-9351-DDCA31E8C22F. This is sometimes caused by a
malformed
plist file:
ProcessException: Process exited abnormally:
An error was encountered processing the command
(domain=NSPOSIXErrorDomain,
code=63):
copyfile of
file:///Users/yassin/Desktop/Projects/handles/build/ios/iphonesimulator/Runner.a
pp/ to
file:///Users/yassin/Library/Developer/CoreSimulator/Devices/B864AB8C-79BE-4A09-
9351-DDCA31E8C22F/data/Containers/Shared/SystemGroup/systemgroup.com.apple.insta
llcoordinationd/Library/InstallCoordination/PromiseStaging/C21EB07A-E655-4BBA-8B
07-5DA8B5397AE4/Runner.app failed: File name too long
Unhandled error domain NSPOSIXErrorDomain, code 63
Command: /usr/bin/arch -arm64e xcrun simctl install
B864AB8C-79BE-4A09-9351-DDCA31E8C22F
/Users/yassin/Desktop/Projects/handles/build/ios/iphonesimulator/Runner.app
[ +7 ms] Error launching application on iPhone 12.
[ +10 ms] "flutter run" took 445,079ms.
[ +14 ms]
#0 throwToolExit
(package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand
(package:flutter_tools/src/commands/run.dart:669:9)
<asynchronous suspension>
#2 FlutterCommand.run.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command.dart:1125:27)
<asynchronous suspension>
#3 AppContext.run.<anonymous closure>
(package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#4 CommandRunner.runCommand
(package:args/command_runner.dart:209:13)
<asynchronous suspension>
#5 FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)
<asynchronous suspension>
#6 AppContext.run.<anonymous closure>
(package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand
(package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
<asynchronous suspension>
#8 run.<anonymous closure>.<anonymous closure>
(package:flutter_tools/runner.dart:62:9)
<asynchronous suspension>
#9 AppContext.run.<anonymous closure>
(package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#10 main (package:flutter_tools/executable.dart:92:3)
<asynchronous suspension>?
What worked for me after many days was deleting all hidden files in the project folder besides git related ones, .idea, .packages etc.. As well as podspec.lock and the Build folder manually.
What worked for someone else with the same issue was "Removing the flutter installation folder, then fetching again from the repo"
Both options should hopefully solve your issue.
I have a flutter application that I am trying to generate release for IOS out of it, but I am facing this error:
sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54.120.1/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
I have tried most of the internet solutions for this error and still get it the same, I am not sure if it is related to something specific or it is a general error, any suggestion would be highly appreciated
flutter build ios --verbose
here is the log:
/Users/husseinajam/Library/Developer/Xcode/DerivedData/Runner-blmaktiwmbrumnfrwrxbcbrwqoqk/Build/Intermediates.noindex/Runner.build/Release-
iphoneos/Runner.build/Script-3B06AD1E1E4923F5004D2608.sh
♦ mkdir -p -- /Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app/Frameworks
♦ rsync -av --delete /Users/husseinajam/Desktop/imim/ios/../ios/Flutter/App.framework
/Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app/Frameworks
building file list ... rsync: link_stat "/Users/husseinajam/Desktop/imim/ios/../ios/Flutter/App.framework"
failed: No such file
or directory (2)
done
sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at
/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54.120.1/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code
GenerateDSYMFile /Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app.dSYM
/Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app/Runner (in target 'Runner' from project
'Runner')
cd /Users/husseinajam/Desktop/imim/ios
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil
/Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app/Runner -o
/Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app.dSYM
[+8613 ms] "flutter ios" took 118,982ms.
[ +5 ms] Encountered error while building for device.
[ +2 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
#1 BuildIOSCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:116:7)
<asynchronous suspension>
#2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:977:18)
#3 _rootRunUnary (dart:async/zone.dart:1198:47)
#4 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#5 _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#6 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#7 Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#8 Future._completeWithValue (dart:async/future_impl.dart:529:5)
#9 Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
#10 _rootRun (dart:async/zone.dart:1190:13)
#11 _CustomZone.run (dart:async/zone.dart:1093:19)
#12 _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#13 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#14 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#15 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#16 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#17 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
[ +744 ms] ensureAnalyticsSent: 257ms
[ +2 ms] Running shutdown hooks
[ ] Shutdown hook priority 4
[ +1 ms] Shutdown hooks complete
[ ] exiting with code 1
have you tried the following;
'flutter clean' command -> run build(if supporting iOS 9 try changing it to iOS 11 for a test)
Updating flutter to the latest version and running and running the first step?
I am using Xcode 12.4
Build Settings -> Targets -> Build Active Architecture Only, set it to Yes.[Debug,Profile & Release for all]
I am trying to use Webstorm for my Dart project since it is recommended. I have installed it and point it to the Dart sdk and dartium path. On creating a new Dart project, I only see Dart Web App and Dart Command Line App. No polymer template or any other template. What can I do to see those template.
RELEVANT VERSIONS OF DART OFFERINGS:
Dart 1.11.0 (ref 65704b3) DEV (SDK)
Dart 1.11.0 (ref 65704b3) (STABLE) DARTIUM
EDIT 1 (relates to first comment by Gunter)
I deleted and attempted to reinstall stagehand but I am getting the following errors
C:\Users\dart.user\AppData\Roaming\Pub\Cache\global_packages>pub global ac
tivate stagehand
Resolving dependencies...
+ args 0.13.2
+ collection 1.1.1
+ crypto 0.9.0
+ http 0.11.2
+ http_parser 0.0.2+7
+ path 1.3.5
+ source_span 1.1.2
+ stack_trace 1.3.3
+ stagehand 0.2.1
+ string_scanner 0.1.3+1
+ usage 1.0.0+1
Precompiling executables...
Loading source assets...
Failed to precompile stagehand:stagehand:
Unhandled exception:
Uncaught Error: Failure getting http://localhost:49681/packages/crypto/crypto.da
rt: 404 Not Found
Stack Trace:
#0 _asyncLoadError (dart:_builtin:285)
#1 _httpGet.<anonymous closure>.<anonymous closure> (dart:_builtin:228)
#2 _RootZone.runGuarded (dart:async/zone.dart:1082)
#3 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.
dart:390)
#4 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399)
#5 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:290)
#6 _ForwardingStream._handleDone (dart:async/stream_pipe.dart:112)
#7 _handleDone (dart:async/stream_pipe.dart:180)
#8 _RootZone.runGuarded (dart:async/zone.dart:1082)
#9 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.
dart:390)
#10 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399)
#11 _DelayedDone.perform (dart:async/stream_impl.dart:614)
#12 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:711)
#13 _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart
:671)
#14 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#15 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#16 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#17 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dar
t:131)
#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:886)
#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dar
t:131)
Several attempts simply result in the same error.
I did a pub cache repair but the result is the same.
Stagehand provides the following templates; polymer isn't one of them.
$ stagehand
Stagehand will generate the given application type into the current directory.
usage: stagehand <generator-name>
--[no-]analytics Opt out of anonymous usage and crash reporting.
-h, --help Help!
--version Display the version for stagehand.
--author The author name to use for file headers.
(defaults to "<your name>")
Available generators:
console-full - A command-line application sample.
package-simple - A starting point for Dart libraries or applications.
server-shelf - A web server built using the shelf package.
web-angular - A web app with material design components.
web-simple - A web app that uses only core Dart libraries.
web-stagexl - A starting point for 2D animation and games.
My application was being developed with 1.6.0-dev.09_07 and starting my application was done with no issue.
I switched to the 1.6.0.release-stable received the following error:
--- 8:03:25 AM Starting pub serve : epimss_design ---
Loading source assets...
Loading polymer/src/build/mirrors_remover, observe and smoke/src/default_transformer transformers...
'Unhandled exception:
Uncaught Error: SocketException: OS Error: The semaphore timeout period has expired.
, errno = 121, address = localhost, port = 58876
#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:820)
#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#3 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:126)'
dart:isolate-patch/isolate_patch.dart 256 Isolate.spawnUri
e:%5Cb%5Cbuild%5Cslave%5Cdart-editor-win-stable%5Cbuild%5Cdart%5Csdk%5Clib%5C_internal%5Cpub%5Clib%5Csrc%5Cdart.dart 179 _isolateBuffer
dart:isolate-patch/isolate_patch.dart 219 _startIsolate.isolateStartHandler
dart:isolate-patch/isolate_patch.dart 122 _RawReceivePortImpl._handleMessage
I tried the 1.7.0.dev_00_01 release with the same error.
What has changed in the current stable release (1.6) and 1.7 dev streams to cause this.
I removed all DartEditor, pub and .dartium folders so not to have any legacy issues, but it still does not work.
I ran pub-upgrade on all apps with no errors - this suggest that my pubspec.lock and pubspec.yaml are OK.
Thanks