shorebirdtech / shorebird

Code Push for Flutter and other tools for Flutter businesses.
https://shorebird.dev
Other
2.27k stars 135 forks source link

Failed to build: [shorebird] failed to generate shorebird configuration. #1914

Open chris-jk opened 6 months ago

chris-jk commented 6 months ago
✗ Failed to build: [shorebird] failed to generate shorebird configuration.
Exception: Cannot find shorebird.yaml in /Users/chris/Desktop/daily_reflections/build/ios/archive/Runner.xcarchive/Products/Applications/Runner.app/Frameworks/App.framework/flutter_assets/shorebird.yaml.
eseidel commented 6 months ago

Thanks for the report. I'd be curious to see what shorebird doctor prints for your project? I wonder if shorebird.yaml isn't listed as an asset in pubspec.yaml? shorebird doctor should check for that.

quanglm23 commented 5 months ago

I have the same issue when build shorebird release ios [ +16 ms] Archive succeeded but the expected xcarchive at /Users/Data/workspace/my-application/apps/myapp/build/ios/archive/app.xcarchive not found [ +1 ms] [shorebird] failed to generate shorebird configuration. Exception: Cannot find shorebird.yaml in /my-application/apps/myapp/build/ios/archive/app.xcarchive/Products/Applications/my.app/Frameworks/App.framework/flutter_assets/shorebird.yaml.

chris-jk commented 5 months ago

i tried to add a HomeWidget for the app i think was the issue i also needed to update shorebird i found out later. it never told me to update.

tusharbhambere commented 5 months ago

Same Issue

✗ Failed to build: [ +12 ms] [shorebird] failed to generate shorebird configuration. Exception: Cannot find shorebird.yaml in /Users/tushar/Documents/Qviple/quiple_consumer/build/ios/archive/Runner.xcarchive/Products/Applications/Runner.app/Frameworks/App.framework/flutter_assets/shorebird.yaml. Please file an issue at: https://github.com/shorebirdtech/shorebird/issues/new

[ +1 ms] Encountered error while archiving for device.

erickzanardo commented 4 months ago

@tusharbhambere which command did you run that produced that log?

chris-jk commented 4 months ago

its back

shorebird doctor: Shorebird 1.1.9 • git@github.com:shorebirdtech/shorebird.git Flutter 3.22.1 • revision 2f366bd7c9cdb59a1231fdb13c985be48f47149b Engine • revision e5fdf87c8fa18e584204987de09e6d86f462c87c

✓ Shorebird is up-to-date (1.2s) ✓ Flutter install is correct (1.0s) ✓ AndroidManifest.xml files contain INTERNET permission (89ms) ✓ Has access to storage.googleapis.com (0.2s) ✓ shorebird.yaml found in pubspec.yaml assets (12ms)

No issues detected!

eseidel commented 4 months ago

If you run ls build/ios/archive/Runner.xcarchive/Products/Applications/Runner.app/Frameworks/App.framework/ is there anything there? e.g. is flutter_assets there? Is just shorebird.yaml missing?

eseidel commented 4 months ago

@chris-jk we're also reachable on Discord at https://discord.gg/shorebird if you ever need a live response (although we're pretty good about responding to github most of the time too).

chris-jk commented 4 months ago

No such file or directory, it is in my yaml assets: - shorebird.yaml im just trying to run a debug from vs code I'm not even trying to use shorebird right now.

eseidel commented 4 months ago

I wonder if what happens is that flutter assemble flx (which I think is what actually does the building of the flutter_assets) ends up being cached between debug builds (which will not include shorebird) and --release builds (which do use Shorebird).

eseidel commented 4 months ago

No such file or directory, it is in my yaml assets: - shorebird.yaml im just trying to run a debug from vs code I'm not even trying to use shorebird right now.

Are you seeing a shorebird-related log while trying to use normal Flutter? I wonder if you could be hitting: https://docs.shorebird.dev/troubleshooting/#i-installed-shorebird-and-now-i-cant-run-my-app-in-vs-code

chris-jk commented 4 months ago

That more than likely is the problem. I will check (in the middle of an update I need to get out ASAP lol) I deleted .shorebird folder and re-added it seems to be working, but I had recently updated flutter. So that seems like it could be the problem.

quanglm23 commented 4 months ago

If you run ls build/ios/archive/Runner.xcarchive/Products/Applications/Runner.app/Frameworks/App.framework/ is there anything there? e.g. is flutter_assets there? Is just shorebird.yaml missing?

In my case shorebird find in different path with actual path xcode generate. I'm using app name with format like "app.vn" I think shorebird command ignore ".vn" and find asset in path /app. xcarchive/ in while xcode actually generate path is /app.vn.xcarchive/ I cannot change the app name. So How can I specific the name of xcarchive folder for shorebird in CLI?

eseidel commented 4 months ago

Hmm, I think we support dots in the name, but I'll keep looking: https://github.com/shorebirdtech/shorebird/blob/main/packages/shorebird_cli/lib/src/artifact_manager.dart#L167C14-L167C35

Regardless, that's a very useful lead, thank you!

eseidel commented 4 months ago

I looked through this again this morning. This log message is gone after @bryanoltman's re-write of our release pipeline last month.

I'm not certain this will solve the issue, but I would recommend running shorebird upgrade if you haven't. shorebird should ideally always be on the latest version, but even the newest shorebird versions will work with older versions of Flutter. But using the latest shorebird might resolve this issue for you, or at least would give us a different log message which might help debug the issue further.

quanglm23 commented 4 months ago

@eseidel I'm already used version 1.1.9 the latest version of Shorebird. When I tried renaming app display name and removing the dot, it worked. This command i used: shorebird release ios --flutter-version=3.19.6 --flavor prod

bryanoltman commented 4 months ago

@quanglm23 That's very helpful. Filed https://github.com/shorebirdtech/shorebird/issues/2206 to track that specific failure mode.

erickzanardo commented 4 months ago

Closing this in favor of https://github.com/shorebirdtech/shorebird/issues/2212 so we can track this issue in a single place.

quanglm23 commented 4 months ago

@erickzanardo Is there any workaround solution to archive that with shorebird?

erickzanardo commented 4 months ago

@quanglm23 we are currently having trouble reproducing this issue, so we still don't have much clue on how to fix, or workaround it.

If you are facing this issue, please help us by sharing info about it in the main issue #2212, or Discord. Information like which command are you running when this happen, your shorebird doctor, and the verbose output (-v) of the command you ran will be super helpful for us to track this down.

eseidel commented 4 months ago

@erickzanardo what can we do to help users provide us better logs here?

erickzanardo commented 4 months ago

@eseidel The last PR that we recently merged on the flutter repo will improve this message a lot. As we discussed async, I will also add some better information to our CLI when something breaks to help us identify the problems when something fails