Fastlane deliver .ipa file to TestFlight from Expo build URL - expo

I'm following this article to auto-deploy .ipa file after building with Expo: https://blog.expo.io/automating-standalone-expo-app-builds-and-deployments-with-fastlane-exp-and-exptool-9b2f5ad0a2cd
It's work, but I have to download .ipa file from Expo then upload it to TestFlight. This takes a long time for waiting while Expo already builds .ipa file and we just need to upload it to TestFlight.
Current script to deploy is:
// Download .ipa file from Expo build
curl -o app.ipa "$(expo url:ipa --non-interactive)"
// Upload this to TestFlight
fastlane deliver --verbose --ipa "app.ipa" --skip_screenshots --skip_metadata
I tried to replaced app.ipa by Expo build url (something like: https://exp-shell-app-assets.s3.us-west-1.amazonaws.com/ios/myusername/app-bfaf-ca19c79a9c0f-archive.ipa)
fastlane deliver --verbose --ipa "https://expo-url.ipa" --skip_screenshots --skip_metadata
It throws an error because fastlane deliver always add current directory before URL, the error is:
Error setting value 'https://exp-shell-app-assets.s3.us-west-1.amazonaws.com/ios/myusername/app-bfaf-ca19c79a9c0f-archive.ipa' for option 'ipa'
[!] Could not find ipa file at path '/Users/root/project/https://expo-url.ipa'
I tried fastlane pilot upload and got the same issue.
Thanks!

fastlane upload file in your pc , not file link...
if you want build standalone expo ... I recommend to turtle-cli see tutorial here ...
turtle-cli make server localhost to build source output file in /Users/xxx/expo-apps/ .. then you can copy file and using fastlane to upload file to App Store and Google play.

Related

Sentry Expo: release will not upload index.android.bundle

In short: why index.android.bundle is not uploaded to Sentry server following expo's guide
I made a GitHub issue as I tested this with a clean repository. And there I specified the issue better and with more detail. The main problem could be the script I'm using. I will link the issue here:
https://github.com/expo/sentry-expo/issues/313
Hello.
I'm using the latest sentry-expo which correctly sends errors to sentry server.
I have followed the documentation from https://docs.expo.dev/guides/using-sentry/#uploading-source-maps-for-updates
On new builds index.android.bundle and .map is uploaded to sentry.
But when I make an update running eas update and following the sentry-cli releases... script as documented in expo guide, the android-'hash'.map file is uploaded and index.android.bundle is not.
Therefore dist is different between .js and .map file and Sentry issues don't contain source map information:
Source code was not found (see Troubleshooting for JavaScript)
Url app:///index.android.bundle
But if I change index.android.bundle to index.android.bundle.js in Sentry-cli --rewrite command the bundle is uploaded but issues still show the same information probably due to that android Archive is ~/index.android.bundle.js but the issue is expecting ~/index.android.bundle.
package versions:
"#sentry/react-native": "4.9.0",
"expo": "~47.0.8",
"sentry-expo": "~6.0.0",
I add here that I'm on Windows and couldn't get sentry-cli release to work as it is documented in expo-sentry tutorial. I used this script
cross-env ./node_modules/#sentry/cli/bin/sentry-cli releases --org 'organization name' --project 'project name' files 'release name' upload-sourcemaps --dist 'Android Update ID' --rewrite dist/bundles/index.android.bundle dist/bundles/android-'hash'.map
Thank you for all the help!
Android*.js file simply needed to be changed to index.android.bundle not to index.android.bundle.js. Now source maps are showing correctly.
Expo documentation showed everything correctly but my own understanding added the need of .js in file naming. Bundle file without any extension works correctly

Build on Vercel with Prisma is not working recently (how to include schema.prisma file?)

I developed SvelteKit app with Prisma and am trying to deploy it on Vercel.
In package.json, configuration below should be set so that schema.prisma file located in root path is available when app is deployed.
"postbuild": "cp prisma/schema.prisma .vercel_build_output/functions/node/render/ && cp node_modules/#prisma/engines/*query* .vercel_build_output/functions/node/render/",
Problem is an error occurred during the build on Vercel, but that wasn't occurred before (~ May 2022).
I guess cause of the error is related to recent update of SvelteKit and found that directory of .vercel_build_output that is generated during the build is changed to the new .vercel recently. However, the new path structure for index.js (i.e. .vercel/output/functions/render.func/home/s/test/discord-bot-frontend/.svelte-kit/output/server/index.js) is so different from the previous (i.e. .vercel_build_output/functions/node/render/) that I cannot find right path for it.
Would you please let me know right setting for package.json?
Error message:
> discord-bot-frontend#0.0.1 postbuild
> cp prisma/schema.prisma .vercel_build_output/functions/node/render/ && cp node_modules/#prisma/engines/*query* .vercel_build_output/functions/node/render/
cp: cannot create regular file ‘.vercel_build_output/functions/node/render/’: No such file or directory
Error: Command "npm run vercel-build" exited with 1
I found that there is no need to modify .vercel_build_output now. In other words, the post build is not needed anymore.
It is probably because latest Vercel handles this point.

Unable to automatically deploy a dotnet app to Elastic Beanstalk

I’m trying to deploy a test application to EB. I’m running into an issue. I followed this tutorial: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/dotnet-linux-core-tutorial.html
When I upload the test application, it fails to start. /var/log/eb-engine.log says
2022/02/07 21:59:18.585543 [ERROR] An error occurred during execution of command [app-deploy] - [CheckProcfileForDotNetCoreApplication]. Stop running the command. Error: err
or stat /var/app/staging/dotnet-core-tutorial: no such file or directory with file /var/app/staging/dotnet-core-tutorial
So I changed the parent directory in my source bundle so that it exported into /var/app/staging/dotnet-core-tutorial instead of /var/app/staging. Now I get this error
2022/02/07 22:29:51.468918 [ERROR] An error occurred during execution of command [app-deploy] - [CheckProcfileForDotNetCoreApplication]. Stop running the command. Error: the
re is no .runtimeconfig.json file for your single application. Please provide a valid application
I confirmed that the source bundle does have a .runtimeconfig.json file.
The .runtimeconfig.json file is generated when you run the dotnet publish -o site command, so check if this command is running properly for you.
If you take a look on the tutorial, section "To create a source bundle" you have this file, so check the steps that you already did.
Also if you want to force this file to be generated you can add set
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> directly, but this is normally needed when you are not creating executable files like class libraries.

gcloud builds submit command is not working as per the documentation

Trying to build the image by using gcloud build submit command with passing the source as GCS bucket as per the syntax but it's not working.
gcloud builds submit gs://bucket/object.zip --tag=gcr.io/my-project/image
Error : -bash: gs://bucket_name/build_files.zip: No such file or directory
This path exists in the GCP project where I'm executing the command but still it says no such file or directory.
What I'm missing here ?
Cloud Build looks for local file or tar.gz file on Google Cloud Storage.
Is the case of a zip file like your case, the solution is to start to download locally the file, UNZIP THE FILE and then launch your Cloud Build.
Indeed, you need to unzip the file. Cloud Build won't do it for you, it can only ungzip and untar files. When you add --tag parameter, Cloud Build looks for a Dockerfile file if your set of file and run a docker build with this file.
Please try with single quotes(') or double quotes(") around gs://bucket/object.zip, and not the back quote (`), so the command would look like this:
gcloud builds submit 'gs://bucket/object.zip' --tag=gcr.io/my-project/image
Looks like there is an issue with the documentation, the changes have now been submitted to Google.

how to run a one-off task on cloudfoundry to upload data before starting Python app

Hi this is my first experience trying to deploy a Python app on cloud using CF. I am having issues deploying my app; I sincerely appreciate if anyone can help me or point me to the right direction to solve the issue.
The main problem is the app that I am trying to deploy is large size due to a lot of python dependencies. The size of my app directory is 200 Kb. The first error I observed was: Staging fails due to "Failed to upload payload for droplet" . I think the reason is when all Python dependencies are downloaded from requirements.txt file and finally the droplet is created its size is too large for upload. The droplet size=982. 3 Mb.
The first solution I tried was vendoring app where I created a vendor directory containing all python dependencies but the size of vendor directory was greater that 1Gb, which causes the upload size exceed 1Gb limit and leads to failure in uploading app files.
The second solution I am working on is to upload all installed Python libraries on an object store (in my case S3 bucket which is bounded to my app) and then download the dependencies folder called Pypackages to the app's root directory: /home/vcap/app, so I want to have /home/vcap/app/Pypackages exist before my app starts on the cloud. But I couldn't do it successfully yet. I have included a python script in my app directory which downloads files from S3 bucket successfully. (I have put the correct absolute path for download in downloadS3.py script ie, /home/vcap/app/Pypackages) I want to run this script using "python downloadS3.py" as a one-off task. First I tried the solution here : Can I have multiple commands run in a manifest.yml file?
and although I can see the status of the task is SUCCEED via '$cf tasks my-app-name' , /home/vcap/app/Pypackages does not exist.
I also tried to run one-off task as the steps below:
1-
$ cf push -c 'python downloadS3.py && sleep infinity' -i 1 --no-route
2-
$ cf push -c 'null'
I have printed the contents of /home/vcap/app on my app, ie when app is started and I enter the url in my browser (I don't know what is the right way to see the contents of root directory). Anyway, the problem is Pypackages are not downloaded to the correct root directory. I am not sure if I am running the one-off task in a wrong way or if there is a better solution to make my app work.
I appreciate any helps! (edited)
Diego Cells stage apps and upload droplet to blobstore via cloud controller, the max file can be uploaded is configurable at Ops Manager > TAS for VMs > Application Developer Control > Maximum File Upload Size (MB), default is 1024MB. Seems this is causing restriction, if you can get it increased with your admin help...
Tasks run in their own containers so possibly not an option. I think Python buildpack collects and install the packages before creating the droplet, so don't think copying packages directly to /app directory will be of much help.
If you have data files then you can use .profile file and do some scripting to copy them from S3 or server/NFS location into the /app directory. Something like
wget http://s3.location.com/data_files
cp data_files /home/vcap/app/
But if all these are packages and increasing the size is not feasible then you may need to look to break the app..