Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Using Scratch.UserSession.load causes JSON error #39

@ghost

Description

Here is the code I used:

Scratch.UserSession.load(function(err, user) {
  if (err) return console.error(err)
  user.cloudSession(642505948, function(err, cloud) {
    if(err) return console.error(err)
    cloudSession = cloud
  });
});

Here is the error:

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /home/runner/scratch-cloud-setter/node_modules/scratch-api/scratchapi.js:99:23
    at IncomingMessage.<anonymous> (/home/runner/scratch-cloud-setter/node_modules/scratch-api/scratchapi.js:37:37)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions