Skip to content

Unexpected token < in JSON at position 0 #68

Open

Description

@ernsheong

image

I have a bug in production (3rd error), the surrounding first 2 and latter 2 are mysterious to me. Can anyone explain further?

Activity

  1. bz2 commented on Jun 11, 2019

    @bz2
    Contributor

    See upstream merge proposal stacktracejs/stacktrace-gps#57 which may not be the right fix, but is this issue.

    In short, your source map is not valid JSON for some reason. Probably the error should be handleable at the stackdriver-errors-js level, but at the moment is not propagated up.

  2. ernsheong commented on Jun 11, 2019

    @ernsheong
    Author

    Thanks. The panaroid developer in me decided not to expose sourcemaps for fear of losing IP. Let me know if that shouldn't be a cause of concern... I think protection mechanisms for sourcemaps are still clunky.

    So perhaps sourcemaps should be made optional. Bonus points if sourcemaps can be exposed only to Stackdriver, done securely.

  3. bz2 commented on Jun 11, 2019

    @bz2
    Contributor

    That's fair enough, and see #4 for supporting private sourcemaps. If you're scrubbing sourcemaps for prod deploy though, you should also scrub the url reference from the bottom of the source files to avoid this bug.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions