Error: getaddrinfo ENOTFOUND undefined on a specific page - next.js

We use next.js with knex.js as query builder, in all pages everything is OK except in one page that we have ISR aka getStaticPaths and in that method we get the following error whenever we try to execute a query, but in other pages that do not have getStaticPaths everything works fine:
Server Error
Error: getaddrinfo ENOTFOUND undefined
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
GetAddrInfoReqWrap.onlookup [as oncomplete]
node:dns (71:26)
no more info is provided anywhere else. as it is shown in the error message, the database host is undefined but why it read correctly everywhere except in getStaticPaths??

Turns out we had this experimental feature tuned on in next.config.js, when it is turned on .env variables are all undefined and not loaded correctly inside getStaticPaths but once the getStaticProps is called everything is OK, I do not know the reason for this, but turning workerThreads off solved the problem:
experimental: {
workerThreads: false //fixed the problem
},

Related

Nextjs not compiling after changes in code, throws -4094 unknow error

Nextjs stucks at compiling all of a sudden i do not know why. I change something in code and save then it stucks at compiling, when i refresh the page it throws internal server error.
[Error: UNKNOWN: unknown error, open 'C:\Users\Omer\stateskop-deployment\src\client\.next\build-manifest.json'] {
errno: -4094,
code: 'UNKNOWN',
syscall: 'open',
path: 'C:\\Users\\Omer\\stateskop-deployment\\src\\client\\.next\\build-manifest.json'
}
I serve my app with Nestjs backend, i think this problem started after i implemented localization with next-translate. I deleted every file relevant to that but still couldnt fix the problem and i have no idea why this problem occurs

Uncaught TypeError: Cannot read property 'register' of undefined

I'm using pushpad.xyz for push notifications in my wordpress project. I added pushpad code but I get this error which I can't understand.
pushpad.js:292 Uncaught TypeError: Cannot read property 'register' of undefined
at Object.registerServiceWorker (pushpad.js:292)
at Object.init (pushpad.js:261)
at init (pushpad.js:362)
at window.pushpad (pushpad.js:548)
at pushpad.js:551
at Array.forEach (<anonymous>)
at pushpad.js:550
at pushpad.js:553
Could some one explain why I'm getting this error. Because this error is coming only in this wordpress project which I'm running in a virtual machine using vagrant. Is this the reason for the error? If yes how can I fix it?
The relevant line in pushpad.js that raise the error is the following:
navigator.serviceWorker.register(_.options.serviceWorkerPath, { updateViaCache: 'none' });
Thus the error indicates that navigator.serviceWorker is undefined: probably you are using an old or buggy browser version.

ClrDateContainer receive in docker undefined commonStrings

We use submodules. From one times we started received error
TypeError: Cannot read property '__source' of undefined
After debug code I founded that problem is commonString in ClrDateContainer component in undefinded
link for screenshots (I can't publish)
https://ibb.co/SyRRCHZ
https://ibb.co/gwQWW5R
With local build ok. It happens looks like only in docker.

Error loading repositories

In the Azure portal, when I go to my Container Registry and click on Repositories (under Services), my repositories don't load and I get the error message Error loading repositories.
The console of Chrome contains the following error messages:
GET https://REMOVED.azurecr.io/v2/_catalog 401 (Unauthorized) - REMOVED.azurecr.io/v2/_catalog:1
[Microsoft_Azure_ContainerRegistries] 1:20:06 PM -
efe5474C39B089216811DEA68B8392644A0C676A067.js:24 (With body:)
MsPortalFx.Base.Diagnostics.ErrorReporter 1 MsPortalFx.Base.Diagnostics.ErrorReporter: _errorData: undefined
_sourceErrorLevel: undefined
baseTypes: ["MsPortalFx.Errors.AjaxError","MsPortalFx.Errors.Error"]
code: undefined
data: {"type":"GET","sessionId":"9e259d2b5dab4ad2972a1e6b76e844d2","status":401,"statusText":"Unauthorized","duration":28.5}
errorLevel: 2
errorThrown: Unauthorized
extension: Microsoft_Azure_ContainerRegistries
handled: undefined
innerErrors: []
jqXHR: {"readyState":4,"responseText":"{\"errors\":[{\"code\":\"UNAUTHORIZED\",\"message\":\"authentication required\",\"detail\":[{\"Type\":\"registry\",\"Name\":\"catalog\",\"Action\":\"*\"}]}]}\n","responseJSON":{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]},"status":401,"statusText":"Unauthorized"}
message: ajaxExtended call failed
name: Error
source: undefined
stack: null
textStatus: error
timestamp: 1567.8750000000002
type: MsPortalFx.Errors.AjaxError
The error says I'm unauthorized, but I have the Owner role, so this should not be possible. Other users that are owner don't get this error.
Any clue how I can fix this?
The error resolved itself after a couple of days.
I tried using a different browser and a different computer. Both methods still showed the error. So I think it might have been a bug.
just uploaded my AKS and needed to pull lots of images from ACR. also got error afterwards due to load:
{"type":"MsPortalFx.Errors.FetchDataError","baseTypes":["MsPortalFx.Errors.FetchDataError","MsPortalFx.Errors.DataError","MsPortalFx.Errors.Error"],"_errorData":{"readyState":4,"responseText":"","status":500,"statusText":"Internal Server Error"},"extension":"Microsoft_Azure_ContainerRegistries","errorLevel":2,"timestamp":10180.93499999668,"source":"DataCache:2:3","message":"","name":"Error","innerErrors":[],"dataSetName":"DataCache:2:3"}

Errors prevented isopacket load: While loading isopacket `constraint-solver`: Cannot call method 'slice' of null

When launching my meteor app with the following command:
MONGO_URL="mongodb://localhost:27017/vision-test" PORT=8282 ROOT_URL="sertal.esb.local:8383" meteor -p 8383
I get following error:
Errors prevented isopacket load:
While loading isopacket `constraint-solver`:
packages/meteor/url_server.js:11:1: Cannot call method 'slice' of null
at Meteor.absoluteUrl.options (packages/meteor/url_server.js:11:1)
at <runJavaScript-2>:1109:4
at <runJavaScript-2>:1194:3
The same error appears when I use the parameters to run the built application.
the ROOT_URL="sertal.esb.local:8383" parameter is missing the http:// part. The http:// or https:// part of the ROOT_URL is mandatory

Resources