Shiny app is unable to deploy

Hello I am unable to deploy a shiny-app with the message below:

Preparing to deploy application...DONE
Uploading bundle for application: 7832248...DONE
Deploying bundle: 7170079 for application: 7832248 ...
Waiting for task: 1296973664
building: Parsing manifest
building: Building image: 8523304
building: Fetching packages
building: Installing packages
building: Installing files
building: Pushing image: 8523304
################################ Begin Task Log ################################
################################# End Task Log #################################
Error: Unhandled Exception: Child Task 1296973665 error: Unhandled Exception: 'utf-8' codec can't decode byte 0x8b in position 39887: invalid start byte
Execution halted

Can anybody help to understand the error and debug?

1 Like

I also get the exact same error on my Shiny app based on Golem using MacOS ventura. It seems to be an erratic behavior. 90% of the times I try to deploy this happens, the other 10% it goes through without any change other than just restarting the session. It is very annoying and time consuming. Google searches suggest to remove the .Rhistory files and check for non-ASII characters, I've done that and sometimes works but it never goes totally away. I hope someone can give a better answer than me.

Thanks for you reply!

What are non-ASII characters?

I will look into removing the .Rhistory files.

ASCII is a character encoding with only 128 code points, the first 32 of which are control characters (e.g. tab, newline). 0x8b in decimal is 139, which is too high (i.e. > 127) if something is trying to decode as ASCII. Until about 20 years ago it (or variations of it in the form of ISO-8859) was the predominant encoding used by computers in western locales.

But your error is about UTF-8, which is an encoding that's designed to be able to handle the whole Unicode character space while having the first 128 code points be backward compatible with ASCII. UTF-8 uses a variable number of bytes per character, but not every possible byte can be the first byte of a character. Clearly 0x8b is one that can't be.

The TL;DR is that somehow you're getting an invalid character in your output. I don't think it's diagnosable based on just the error message.

Thank you for your detailed response!

is there anything else that could help diagnose this issue in your opinion?

What would be helpful would be a reproducible example (aka reprex) of code that triggers the error. I know it can be hard if the bug happens intermittently, but if it's even fairly consistent, then try to make a minimal example off your code that gets the same behavior.

Turns out it was an error in shiny.io and they have fixed the issue as of today!

@darwin I am have the same issue, except with byte 0xf6. You mentioned it was a shinyapps error. How were you able to notify them and expedite a fix?