Reputation: 892
I have Bugsnag javascript API integrated on my web application and everything was working fine but from last few days Bugsnag has stopped to record errors. It prints following console log on every error:
[Bugsnag] Invalid API key 'undefined'
I have searched a lot on Google but could not find any relevant solution. I found this link https://github.com/segment-boneyard/analytics.js-integrations/issues/61 which says we might be using old version library but I am using the latest CDN URL given in Bugsnag integration guide. Please help.
Bugsnag integration script:
<script src="https://d2wy8f7a9ursnm.cloudfront.net/bugsnag-3.min.js" data-apikey="MyAPIKEY" data-releasestage="development" data-notifyhandler="xhr"></script>
In place of MyAPIKEY, I have placed my API key given by Bugsnag.
Upvotes: 3
Views: 2208
Reputation: 892
I raised a support ticket to Bugsnag support team and they told me that we are using two separate API keys for same project on different environment. In my case it was development server and production server. Using same key on both server and then identification via project data-releasestage
attribute resolved the issue.
Upvotes: 3