Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bugsnag: Invalid API key 'undefined'

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.

like image 364
Rahul Singh Avatar asked Jun 19 '26 17:06

Rahul Singh


1 Answers

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.

like image 56
Rahul Singh Avatar answered Jun 22 '26 08:06

Rahul Singh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!