Problem deploying: Error building image: Build exited with non-zero status: 127

Hi.
I found myself having problems deploying my apps, had the following message

Error: Unhandled Exception: Child Task 1372977261 failed: Error building image: Build exited with non-zero status: 127

I updated R 4.3.2 and Rstudio 2023.12.0
also shiny 1.8.0 and rsconnect 1.2.0

Similar messages from years ago says that it might be a problem with shiny building images for newer versions of R.

Thank you.

3 Likes

@kevinushey Hi! ME and other user have similar problem when deploying an app and tries to "build image". I wrote a ticket a couple of hours ago.

Thank you (sorry for tagging)

Same here. same error. Same background.

Same message. It started yesterday. Any solution? :frowning:

End Task Log

Error: Unhandled Exception: Child Task 1373429374 failed: Error building image: Build exited with non-zero status: 127
Ejecuciรณn interrumpida

Should we go back a get an older version of R and RStudio? Did somene test that?

At first I tried to deploy in 4.1.1, it didn't work. Then I switch to 4.3.2
4.1.1 was the last version the app deployed fine back in December.

Hello,

Sorry for the inconvenience. There was a recent change to shinyapps.io which affected building of applications using rJava. We have an open issue over here which we are presently working on,

I looked up a couple of the tasks and images above and they look to be affected by this particular issue because they are using that package. If anyone is encountering this error - but not using rJava- could you please provide the tasks ids to any build error messages returned from rsconnect during the deployment for debugging purposes on my end.

If the details of the error are private feel free to either open a support case about the issue or send me a DM through community with the error message.

Thanks for your patience!

Sean

1 Like

You are right. I have replaced the package "xlsx" with another one, which does not use rJava, and the application works using ShinyApps. Thanks!

I replaced xlsx with openxlsx, but still showing same error

I'm having the same issue, the application runs fine on my local Rstudio but cannot deploy to shiny.io, the console shows the following error message during deployment:

โ”€โ”€ Deploying to server โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Waiting for task: 1373712877
building: Parsing manifest
building: Building image: 9781688
building: Installing system dependencies

Begin Task Log

Quarto not found.

  • echo '[2024-01-12T22:57:26.150990311+0000]' 'Execute script: packages/build/rJava.sh'
    [2024-01-12T22:57:26.150990311+0000] Execute script: packages/build/rJava.sh
  • /usr/bin/R CMD javareconf
    packages/build/rJava.sh: line 8: /usr/bin/R: No such file or directory## End Task Log ################################################################
    Error: Unhandled Exception: Child Task 1373712878 failed: Error building image: Build exited with non-zero status: 127
    Execution halted

I'm using R 4.3.2, Rstudio 2022.07.1
It seems rJava cannot be found on shiny.io. any solutions to solve this issue? Thank you.

Openxlsx works for me :smiling_face_with_tear:. Maybe there are other packages with rJava dependency used by your program.

Ah, Found it, there was a xlsx:: somewhere in the server... thank you for the tip

I found this thread by Google and am running into the same issue. I see the issue linked above was merged into main - do I need to do anything on my side to receive the updates? Or did the solution only affect some but not all packages using rJava? Thank you!

Hi All,

Sorry for the inconvenience this has caused. This issue ended up being larger than expected, and we have rolled back the change that was introduced to shinyapps.io last week. Please try to redeploy your applications and let us know if the error persists.

Thank you,

Jacob

Thank you Jacob. I was able to deploy this morning with no errors! Thank you for resolving this!

Jacob and Sean,

Thank you for your help. Problem persists for me. Any help would be greatly appreciated. Thanks in advance.

Mostly rmarkdown and quarto specific functions. Deployed just fine last week:

Begin Task Log

GET /v1/tasks/d2ab5d78-7f0d-431c-8cb9-24cb2ab6a3a1/logs/ 179ms
[2024-01-17T15:52:55.549773Z] Loading your source code into a rendering environment...
[2024-01-17T15:52:56.549736Z] Collecting your code's dependencies...
[2024-01-17T15:52:57.549832Z] Reusing as many dependencies as possible from a previous run.
[2024-01-17T15:52:57.554639Z] 0 new R package(s) to install.
[2024-01-17T15:53:10.309000Z] Error (exit code 1)
[2024-01-17T15:53:10.550067Z] Posit Cloud will meter usage starting now.
[2024-01-17T15:53:10.554496Z] Failed rendering output.GET /v1/tasks/?filter=account_id:26208&filter=parent_id:d2ab5d78-7f0d-431c-8cb9-24cb2ab6a3a1&count=100&offset=0 92ms

End Task Log

----- Deployment error -----
Error: Job run application=10949756 job_run=4698 failed. Error (exit code 1)

----- Error stack trace -----
4: rsconnect::deployApp(appDir = "~/GoogleDrive/Teaching/PSYC/757/BayesianSyllabus_S2024/_book",
recordDir = "~/GoogleDrive/Teaching/PSYC/757/BayesianSyllabus_S2024",
appFileManifest = "/tmp/d40c-9e50-942c-068a", account = "pem725",
...
3: client$waitForTask(taskId, quiet)
2: stop(status$error, call. = FALSE)
1: (function (e)
{
cat("----- Deployment error -----\n")
...
Error: Job run application=10949756 job_run=4698 failed. Error (exit code 1)
Execution halted

Thank you!
It's working in a test app.
But I did switch xlsx to openxlsx in other app while it was fixed.

But I can confirm it's working.

Hi,
I presented the same problem trying to publish my app.
I am using the following packages:

library(shiny)
library(ggplot2)
library(forecast)
library(dplyr)
library(data.table)
library(DT)
library(scales)
library(plotly)

An I am getting the following:

โ”€โ”€ Preparing for deployment โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
:heavy_check_mark: Re-deploying "Pronosticador" using "server: shinyapps.io / username: cg9jaw-pavel-medina"
:information_source: Looking up application with id "11339448"...
:heavy_check_mark: Found application https://cg9jaw-pavel-medina.shinyapps.io/Pronosticador/
:information_source: Bundling 1 file: 'app.R'
:information_source: Capturing R dependencies with renv
:heavy_check_mark: Found 91 dependencies
:heavy_check_mark: Created 52,766b bundle
:information_source: Uploading bundle...
:heavy_check_mark: Uploaded bundle with id 8328225
โ”€โ”€ Deploying to server โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Waiting for task: 1390861467
building: Parsing manifest
building: Building image: 10079453
error: Building package: MASS

Begin Task Log

End Task Log

Error: Unhandled Exception: child_task=1390861468 child_task_status=failed: Error building image: Error building MASS (7.3-60.0.1). Build exited with non-zero status: 127
Ejecuciรณn interrumpida

What is the problem? I have update my R and Rsutdio version to the latest.

Regards!!

1 Like

I have a similar problem. From the discussion, it seems that the problem is at the posit/shinyapps.io end rather than at my end. Is there anything I can do?

here is my log output:

--- cut ---

----- Deployment error -----
Error: Unhandled Exception: child_task=1391400236 child_task_status=failed: Error building image: Error building R6 (2.5.1). Build exited with non-zero status: 127
 
----- Error stack trace -----
4: rsconnect::deployApp(appDir = "C:/Users/winza/OneDrive/Macquarie_University/Research/R_StatisticalProgrammingLanguage/LikertMaker_Shiny", 
       appFileManifest = "C:/Users/winza/AppData/Local/Temp/88db-6078-1e0c-bf93", 
       account = "winzar", server = "shinyapps.io", appName = "LikertMaker_Shiny", 
    ...
3: client$waitForTask(taskId, quiet)
2: stop(status$error, call. = FALSE)
1: (function (e) 
   {
       cat("----- Deployment error -----\n")
    ...

--- cut ---

Hi everyone,
same thing here... I have been fighting for hours, having various issues " Error building image: Error building ..." with several packages, from mass (7.3-60) (resolved by hiding the code lines using MASS-dependant packages) to the most recent R6 (2.5.1).
Could this be related to the recently updated R version 4.3.3 (2024-02-29) -- "Angel Food Cake" and the shiny updating delay?

Btw, the app was already deployed, I just tried to deploy an updated version (with a few layout changes, which worked locally).

Hope this will be solved soon!