Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors reading or writing breadcrumbs #38

Closed
timfish opened this issue Mar 13, 2018 · 3 comments
Closed

Errors reading or writing breadcrumbs #38

timfish opened this issue Mar 13, 2018 · 3 comments

Comments

@timfish
Copy link
Collaborator

timfish commented Mar 13, 2018

Error: UNKNOWN: unknown error, open 'C:\Users\Username\AppData\Local\AppName\sentry\crumbs.json'
  File "fs.js", line 558, col 18, in Object.fs.openSync
  File "ELECTRON_ASAR.js", line 173, col 20, in Object.module.(anonymous function) [as openSync]
  File "fs.js", line 1233, col 33, in Object.fs.writeFileSync
  File "node_modules/@sentry/electron/dist/lib/store.js", line 85, col 14, in Store.flush
  File "node_modules/@sentry/electron/dist/lib/store.js", line 52, col 37, in Immediate.setImmediate
  File "timers.js", line 651, col 20, in runCallback
  File "timers.js", line 624, col 5, in tryOnImmediate
  File "timers.js", line 596, col 5, in processImmediate [as _immediateCallback]
{
  code: UNKNOWN, 
  errno: -4094, 
  path: C:\Users\Username\AppData\Local\AppName\sentry\crumbs.json, 
  syscall: open
}
@timfish timfish changed the title Failed to write breadcrumbs with UNKNOWN error Errors reading or writing breadcrumbs Mar 19, 2018
@timfish
Copy link
Collaborator Author

timfish commented Mar 19, 2018

This one appears to be because breadcrumbs.json is an empty file

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Store.get (C:\Users\tim\Documents\Repos\MyApp\node_modules\@sentry\utils\dist\lib\store.js:54:24)
    at ElectronBackend.<anonymous> (C:\Users\tim\Documents\Repos\MyApp\node_modules\@sentry\electron\dist\lib\backend.js:145:37)
    at Generator.next (<anonymous>)
    at C:\Users\tim\Documents\Repos\MyApp\node_modules\@sentry\electron\dist\lib\backend.js:7:71
    at Promise (<anonymous>)
    at __awaiter (C:\Users\tim\Documents\Repos\MyApp\node_modules\@sentry\electron\dist\lib\backend.js:3:12)
    at ElectronBackend.loadBreadcrumbs (C:\Users\tim\Documents\Repos\MyApp\node_modules\@sentry\electron\dist\lib\backend.js:144:16)
    at ElectronFrontend.<anonymous> (C:\Users\tim\Documents\Repos\MyApp\node_modules\@sentry\core\dist\lib\base.js:335:64)
    at step (C:\Users\tim\Documents\Repos\MyApp\node_modules\@sentry\core\dist\lib\base.js:40:23)
    at Object.next (C:\Users\tim\Documents\Repos\MyApp\node_modules\@sentry\core\dist\lib\base.js:21:53)
    at C:\Users\tim\Documents\Repos\MyApp\node_modules\@sentry\core\dist\lib\base.js:15:71
    at Promise (<anonymous>)
    at __awaiter (C:\Users\tim\Documents\Repos\MyApp\node_modules\@sentry\core\dist\lib\base.js:11:12)
    at ElectronFrontend.FrontendBase.getBreadcrumbs (C:\Users\tim\Documents\Repos\MyApp\node_modules\@sentry\core\dist\lib\base.js:328:16)
    at ElectronFrontend.<anonymous> (C:\Users\tim\Documents\Repos\MyApp\node_modules\@sentry\core\dist\lib\base.js:217:51)
    at step (C:\Users\tim\Documents\Repos\MyApp\node_modules\@sentry\core\dist\lib\base.js:40:23)
    at Object.next (C:\Users\tim\Documents\Repos\MyApp\node_modules\@sentry\core\dist\lib\base.js:21:53)
    at C:\Users\tim\Documents\Repos\MyApp\node_modules\@sentry\core\dist\lib\base.js:15:71
    at Promise (<anonymous>)
    at __awaiter (C:\Users\tim\Documents\Repos\MyApp\node_modules\@sentry\core\dist\lib\base.js:11:12)
    at ElectronFrontend.FrontendBase.addBreadcrumb (C:\Users\tim\Documents\Repos\MyApp\node_modules\@sentry\core\dist\lib\base.js:196:16)
    at App.emitter.emit.args [as emit] (C:\Users\tim\Documents\Repos\MyApp\node_modules\@sentry\electron\dist\lib\backend.js:319:46)

@jan-auer
Copy link
Member

We should generally handle all errors when reading/writing any state (i.e. breadcrumbs, context and queues) and recover as gracefully as possible.

@jan-auer
Copy link
Member

Should be fixed with the latest release.

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

No branches or pull requests

2 participants