Xhr request errors are not getting logged on Raygun platform - javascript

I have integrated Raygun into one of my angular project and I'm also able to get some of the JavaScript related errors but not reference, syntax and type error on Raygun platform.
Though Raygun is not logging any xhr related errors on their platform. Got 403 Forbidden, 404 Not found and 500 internal server error on my network calls but Raygun did not reported any of those.
I have used the following steps for the setup:
Installed raygun4js package through npm using this command npm install --save raygun4js
Installed #types/raygun4js package through npm using this command npm i --save-dev #types/raygun4js
Added the following code
import { ErrorHandler } from '#angular/core';
const VERSION_NUMBER = '1.0.0.0';
rg4js('apiKey', "***");
rg4js('setVersion', VERSION_NUMBER);
rg4js('enableCrashReporting', true);
export class RaygunErrorHandler implements ErrorHandler {
handleError(e: any) {
rg4js('send', {
error: e
});
}
}
I have checked on their docs and different online available resources for xhr related errors but got no help.
What can I more use to get xhr related errors. In case, if it is not possible, let me know that as well. Also please do let me know if I can or cannot get JavaScript reference, syntax and type error, framework related and performance related error also as I'm not getting that as well on Raygun platform.

Related

Network related issues are not getting logged on sentry platform

I have integrated Sentry into one of my Next.JS application and I'm also able to see JavaScript related errors like reference or syntax error on Sentry platform.
Though sentry is not logging any network related errors on their platform. Got 403 Forbidden, 404 Not found and 500 internal server error on my network calls, but sentry did not reported any of those.
I have used the following steps for the setup:
Installed the SDK using this command npm install --save #sentry/nextjs
Used the wizard automate the initial steps using this command npx #sentry/wizard -i nextjs
Added all configurations from next.config.js to next.config.wizardcopy.js
Deleted next.config.wizardcopy.js and renamed next.config.wizardcopy.js to next.config.js
I have initialised Sentry both in my client and server file like this
Sentry.init({
dsn: '***',
integrations: [
new CaptureConsole()
],
tracesSampleRate: 1.0
});
I have used CaptureConsole method to capture all errors which are there on console and checked on sentry docs and different online available resources for network related errors but got no help.
Could anybody please help me on the same, what can I more use to get network related errors. In case, if it is not possible, let me know that as well.
In my case I am using reactjs, I added new BrowserTracing() as well. You can try this
import * as Sentry from "#sentry/react";
import { CaptureConsole } from "#sentry/integrations";
import { BrowserTracing } from "#sentry/tracing";
Sentry.init({
dsn: "https://e44884be8781480fa50344a421e5aaba#o4504315282653184.ingest.sentry.io/4504315339210752",
integrations: [
new CaptureConsole(),
new BrowserTracing()
],
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
});
The issue was I have used try catch statements on my code there while handling the xhr request and sentry does not log errors which are already handled (used try catch statements), one have to manually log errors on sentry using captureException method in that case

Yarn install azure pipeline "error an unexpected error occurred : [azure-registry] : Request failed \"401 Unauthorized\""

I'm trying to build my Quasar project on an azure pipeline.
My pipeline worked perfectly for a week but yesterday, I don't know why, I can't execute "yarn install" without seeing this error.
error An unexpected error occurred: "{my-azure}/npm/registry/#nestjs/elasticsearch/-/elasticsearch-8.0.0.tgz: Request failed \"401 Unauthorized\""
Each time, it's a different library.
I try to delete my yarn lock but then I have another error when i'm doing yarn install
Couldn't find package "{random library}" on te "npm" registry...
I don't know what to do...
You probably have a permissions issue, here are common solutions:
Check the PAT token in your .npmrc file, it may have expired;
Check permissions on your feed. Give the contributor permission for the corresponding user, the credentials are in the .npmrc file. (https://learn.microsoft.com/en-us/azure/devops/artifacts/feeds/feed-permissions?view=azure-devops#configure-feed-settings)
I've sometimes faced a similar issue where npm can't find a package. It could be related to the upstream source order in your feed, check out this documentation for more details:
https://learn.microsoft.com/en-us/azure/devops/artifacts/concepts/upstream-sources?view=azure-devops#order-your-upstream-sources-intentionally

× Error: Alchemy URL protocol must be one of http, https, ws, or wss. Recieved: undefined React.js

I just clone smart contract react application in VS code and installed node modules. When i try to npm start, it gave me the error " Error: Alchemy URL protocol must be one of http, https, ws, or wss. Recieved: undefined React.js".
How can i solve this problem? Thanks
According to the Alchemy documentation,
using websockets with the web3-alchemy sdk requires setting up your web3 object with a websocket URL, like this:
const { createAlchemyWeb3 } = require("#alch/alchemy-web3");
const web3 = createAlchemyWeb3("wss://eth-mainnet.ws.alchemyapi.io/ws/<api-key>");
when it is set up correctly, you should be able to make a call, for example:
web3.eth.getBlockNumber().then(console.log); // -> 7946893
The error you are seeing is due to an incorrect argument undefined React.js being passed into the alchemy web3 instantiation, basically:
const web3 = createAlchemyWeb3( undefined React.js ); // the error is here
You need to figure out why there is an undefined React.js showing up, and once you fix that error, your app should be able to load!
Not exactly sure but check your package.json file and see the version of react-scripts. If it defines an older version, try updating to the latest with :
npm uninstall react-scripts or yarn remove react-scripts
and re-install using
yarn add react-scripts or npm add react-scripts.
So in my case the problem was that in the code where you call for the json file from artifacts has to be named properly because in my case the name of the file was different so make sure that is not the case with you.

Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'

I am developing a mobile app with using react-native on WebStorm and trying to test it via an Android emulator(Pixel API 28) which I created via using AVD Manager of Android Studio. The problem is when I run the react-native run-android command, I get the following error:
Could not determine the dependencies of task ':app:preDebugBuild'.
> Could not resolve all task dependencies for configuration
':app:debugRuntimeClasspath'.
> Could not resolve com.facebook.react:react-native:+.
Required by:
project :app
> Failed to list versions for com.facebook.react:react-native.
> Unable to load Maven meta-data from
https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml.
> Could not HEAD
'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'.
> Connect to jcenter.bintray.com:443 [jcenter.bintray.com/35.158.228.205, jcenter.bintray.com/3.120.47.203] failed: Read timed out
I tried to clean up the cache with using the command below but it did not worked:
npm cache clean --force
I could not find some similar problems on the web and I am not sure what to show related with this problem.
When I try to run one of my previous project which was perfectly running, after getting this error and I saw that it also throws the same error. Similarly, when I create a new react-native project and try to run it, then I also got the same error. How can I solve this?
I am still loking for a solution. Anyone knows how to solve it?
I finally figured out the problem. I was connecting to internet via my school's network and it was restricting some downloads. So, that is why I got this error. For the ones who encountered with the same error, try to connect to the link in the error to if it is forbidden or not.

Dillinger stuck at "prepping all the things" when running locally

Update: I have checked the console for error, it catches
Uncaught ReferenceError: require is not defined
According to some online posts, it is probably due to the use of require on the browser side. require is meant to be a syntax for Node, which is used on the server side. But the use of [Browserify][browserify.org/] made this possible.
Im not sure how this works but hope someone may give me some advice.
I was trying to run Dillinger on my own Macbook Pro (13-inch)
I followed the instructions on the README.md but when running locally it shows this.
PS. As suggested by post here, I modified the package.json that the dependency installation can proceed.
Dropbox config not found at /Users/[name]/dev/dillinger/plugins/dropbox/dropbox-config.json. Plugin disabled.
Github config not found at /Users/[name]/dev/dillinger/plugins/github/github-config.json. Plugin disabled.
Google Drive config not found at /Users/[name]/dev/dillinger/plugins/googledrive/googledrive-config.json. Plugin disabled.
OneDrive config not found at /Users/[name]/dev/dillinger/plugins/onedrive/onedrive-config.json. Plugin disabled.
express deprecated app.configure: Check app.get('env') in an if
statement app.js:19:5
connect deprecated multipart: use parser (multiparty, busboy,
formidable) npm module instead
node_modules/express/node_modules/connect/lib/middleware/bodyParser.js:56:20
connect deprecated limit: Restrict request size at location of read
node_modules/express/node_modules/connect/lib/middleware/multipart.js:86:15
connect deprecated methodOverride: use method-override npm module
instead app.js:27:19
express deprecated app.configure: Check app.get('env') in an if
statement app.js:56:5
Express server listening on port 8080
http://localhost:8080
When I send a request, it shows this :
Evernote not implemented yet.
GET / 200 34.139 ms - -
GET /css/app.css 304 4.351 ms - -
Then when I tried to open Dillinger at localhost, it is stuck at "Prepping all the things..."
Anyone has any idea why this is so? I am new to Javascript and Node.JS so forgive me if the question looks dumb.
Many thanks in advance!

Categories