Skip to content

"Config schema violation" preventing RStudio from launching #14690

Closed

Description

@kevinushey
Screenshot 2024-05-10 at 4 05 44 PM
Uncaught Exception:
Error: Config schema violation: `view/zoomLevel` must be >= 0.25
at e.exports._validate (/Applications/RStudio.app/Contents/Resources/app-arm64/.webpack/main/index.js:8:50428)
at set store (/Applications/RStudio.app/Contents/Resources/app-arm64/.webpack/main/index.js:8:49387)
at e.exports.set (/Applications/RStudio.app/Contents/Resources/app-arm64/.webpack/main/index.js:8:48155)
at I.zoomLevel (/Applications/RStudio.app/Contents/Resources/app-arm64/.webpack/main/index.js:20:52721)
at IpcMainImpl.<anonymous> (/Applications/RStudio.app/Contents/Resources/app-arm64/.webpack/main/index.js:20:21061)
at IpcMainImpl.emit (node:events:518:28)
at WebContents.<anonymous> (node:electron/js2c/browser_init:2:83555)
at WebContents.emit (node:events:518:28)

I'm not quite sure how I got into this state, but if some configuration setting we have fails the schema validation, we should just set a safe default instead of failing altogether.

Activity

  1. added
    new
    and removed
    new
    on May 10, 2024
  2. added this to the Cranberry Hibiscus milestone on May 10, 2024
  3. kevinushey commented on May 10, 2024

    @kevinushey
    CollaboratorAuthor

    One way to simulate this, on macOS: open the file at ~/Library/Application Support/RStudio/config.json, and change the zoomLevel parameter to a value like 100. Then, if you try to run RStudio from the command line:

    $ /Applications/RStudio.app/Contents/MacOS/RStudio
    [utils.ts] [createStandaloneErrorDialog] Error when creating Standalone Error Dialog:  Error: application not set
        at s (/Applications/RStudio.app/Contents/Resources/app-arm64/.webpack/main/index.js:8:337336)
        at t.createStandaloneErrorDialog (/Applications/RStudio.app/Contents/Resources/app-arm64/.webpack/main/index.js:20:86492)
        at Object.main (/Applications/RStudio.app/Contents/Resources/app-arm64/.webpack/main/index.js:20:40285)
    Config schema violation: `view/zoomLevel` must be <= 5
    

    This is still a bit curious though, since the error I'm seeing is slightly different than the one here, and the zoomLevel set in my configuration file was correct (so it must've been getting read elsewhere?)

  4. gtritchie commented on May 27, 2024

    @gtritchie
    Member

    I hit this as well. My repro steps:

    I get that error, and ultimately have to kill the desktop process (and sometimes also the rsession process).

    This scenario causes config.json to be missing the zoomLevel entry altogether.

    Also, you need to have no "legacy" setting for zoomLevel (from having run pre-Electron desktop), otherwise, that will be used and this problem won't happen. The clean-rstudio script also cleans that up, hence the above steps will hit the bug.

  5. self-assigned this
    on May 27, 2024
  6. ronblum commented on Jul 15, 2024

    @ronblum
    Contributor

    Verified in RStudio Desktop 2024.07.0-daily+310 on MacOS 14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions