Grafana- TypeError: Cannot read properties of undefined (reading 'values') - automated-tests

When i try to Set a query and alert condition under the alert role I keep getting the below error. I search other blogs could not able to resolve this issue
An unexpected error happened
Details
TypeError: Cannot read properties of undefined (reading 'values')
at ni (http://localhost:3000/public/build/AlertingRuleForm.f65c22acec748d21665e.js:145:233)
at div
at de (http://localhost:3000/public/build/9512.8f35f1c2de682ecc2973.js:2:92536)
at li (http://localhost:3000/public/build/AlertingRuleForm.f65c22acec748d21665e.js:252:28)
at div
at de
Query i was using:
from(bucket:"API_BE")
|> range(start: -15m)
|> filter(fn: (r) => r._measurement == "3 API competition")
|> yield()
Grafana Version: 9.3.2
(DataSource)Influx Db version: v2.6.0
I am running grafana and influxd in local machine(Windows:10)

Related

Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D

I upgraded to version 4 and I am getting this error , But I have no idea where its coming from
Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source height is 0.
Its coming around axis = chart.addAxisY(true);
But my chart and everything is created .
Finally found where the bug is happening , if I remove this part that error is not coming , is anything depreciated in below code in version 4 ?
lastsignalname = chart.addUIElement(UIElementBuilders.TextBox, { x: axisX, y: axisY })

TypeError: Cannot set property 'kind' of undefined

trying to run NextJS build I got this error
I am using NextJS version 12.1.6, I tried to remove node_module and package.lock.json but it did not work
any suggestion, please
TypeError: Cannot set property 'kind' of undefined
at transformBlockScopedVariable (/application/node_modules/#babel/plugin-transform-block-scoping/lib/index.js:122:41)
at PluginPass.VariableDeclaration (/application/node_modules/#babel/plugin-transform-block-scoping/lib/index.js:81:9)
at i (/application/node_modules/next/dist/compiled/babel/bundle.js:1890:373015)
at NodePath._call (/application/node_modules/next/dist/compiled/babel/bundle.js:1890:292626)
at NodePath.call (/application/node_modules/next/dist/compiled/babel/bundle.js:1890:292450)
at NodePath.visit (/application/node_modules/next/dist/compiled/babel/bundle.js:1890:293401)
at TraversalContext.visitQueue (/application/node_modules/next/dist/compiled/babel/bundle.js:1890:286761)
at TraversalContext.visitMultiple (/application/node_modules/next/dist/compiled/babel/bundle.js:1890:286362)
at TraversalContext.visit (/application/node_modules/next/dist/compiled/babel/bundle.js:1890:287032)
at Function.traverse.node (/application/node_modules/next/dist/compiled/babel/bundle.js:1890:288552)

React Table TypeError: Cannot read properties of undefined (reading 'isGrouped')

I am using
react-table#7.7.0 and
#types/react-table#7.7.9
Together with react-table-config.d.ts
from this answer.
In my project, I have a table that uses the useExpanded plugin and works perfectly. But when I add useRowSelect and toggleRowSelected is called it crashes. I tried to create a simple example of that error with js but I couldn't.
Things I tried:
Setting selectedRowIds manually using the initialState of the
table works.
Adding the useGroupBy plugin doesn't help. I thought it might help since the error is related to isGrouped.
Using toggleRowSelected(rowId) instead of row.toggleRowSelected() doesn't help.
The error message:
Uncaught TypeError: Cannot read properties of undefined (reading 'isGrouped')
at handleRowById (useRowSelect.js:157:1)
at useRowSelect.js:166:1
at Array.forEach (<anonymous>)
at handleRowById (useRowSelect.js:166:1)
at reducer$8 (useRowSelect.js:170:1)
at useTable.js:124:1
at Array.reduce (<anonymous>)
at useTable.js:117:1
at updateReducer (react-dom.development.js:15318:1)
at Object.useReducer (react-dom.development.js:16425:1)
at Object.useReducer (react.development.js:1512:1)
at useTable (useTable.js:57:1)
at LeftTable (index.tsx:137:1)
at renderWithHooks (react-dom.development.js:14985:1)
at updateFunctionComponent (react-dom.development.js:17356:1)
at beginWork (react-dom.development.js:19063:1)
at HTMLUnknownElement.callCallback (react-dom.development.js:3945:1)
at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:1)
at invokeGuardedCallback (react-dom.development.js:4056:1)
at beginWork$1 (react-dom.development.js:23964:1)
at performUnitOfWork (react-dom.development.js:22776:1)
at workLoopSync (react-dom.development.js:22707:1)
at renderRootSync (react-dom.development.js:22670:1)
at performSyncWorkOnRoot (react-dom.development.js:22293:1)
at react-dom.development.js:11327:1
at unstable_runWithPriority (scheduler.development.js:468:1)
at runWithPriority$1 (react-dom.development.js:11276:1)
at flushSyncCallbackQueueImpl (react-dom.development.js:11322:1)
at flushSyncCallbackQueue (react-dom.development.js:11309:1)
at discreteUpdates$1 (react-dom.development.js:22420:1)
at discreteUpdates (react-dom.development.js:3756:1)
at dispatchDiscreteEvent (react-dom.development.js:5889:1)
Here is the codesandbox (doesn't recreate the problem)

Edges collection undefined until _collections() operation is used

I'm using ArangoDB 3.4.2 and I have a weird problem that I'm not able to explain...
I create a graph (myGraph) in the following in arangosh:
var graph_module = require('#arangodb/general-graph');
var myGraph = graph_module._create('mygraph');
myGraph._addVertexCollection('vertexes');
var edges = graph_module._relation('edges', ['vertexes'], ['vertexes']);
myGraph._extendEdgeDefinitions(edges);
Being vertexes and edges the collections for vertexes and edges, respectively.
Now, I create two vertexes:
db.vertexes.save({"name": "A", "_key": "A"});
db.vertexes.save({"name": "B", "_key": "B"});
So far so good. But now I try to create the edge between both and I get a fail:
127.0.0.1:8529#myDB> db.edges.save("vertexes/A", "vertexes/B", {"name": "A-to-B"});
JavaScript exception: TypeError: Cannot read property 'save' of undefined
!db.edges.save("vertexes/A", "vertexes/B", {"name": "A-to-B"});
! ^
stacktrace: TypeError: Cannot read property 'save' of undefined
at <shell command>:1:9
It seems that db.edges is undefined:
127.0.0.1:8529#MyDB> console.log(db.edges)
2019-01-26T19:01:52Z [98311] INFO undefined
But now, if I run db._collections() it seems that db.edges gets defined (weird!)
127.0.0.1:8529#MyDB> db._collections()
...
127.0.0.1:8529#MyDB> console.log(db.edges)
2019-01-26T19:02:58Z [98311] INFO [ArangoCollection 16807, "edges" (type edge, status loaded)]
and in this moment, the db.edges.save(...) operation works:
127.0.0.1:8529#MyDB> db.edges.save("vertexes/A", "vertexes/B", {"name": "A-to-B"});
{
"_id" : "edges/16899",
"_key" : "16899",
"_rev" : "_YGsKKq2--_"
}
Why db.edges is undefined at the first save()? Why a show colletions operation (which I understand is read-only) is getting it defined? Maybe I'm doing something wrong?
When executing db.edges.save() an internal cache is accessed. If this cache is clear, executing db.edges.save() works to save an edge. Since db._collections() resets this cache, it is possible to run the command afterwards. However if this cache is not clear, an error is thrown as you observed.
The correct and safe way is to access the collection via db._collection("collection-name").
Therefore you can use the following command to save an edge in the edges collection:
db._collection("edges").save("vertexes/A", "vertexes/B", {"name": "A-to-B"});

Jasmine throws minimongo error on Meteor

My code goes here (in coffeescript):
describe "Chat", ->
it "should contain 1 message after insert()", ->
collection = new Meteor.Collection(null)
collection.insert({username:'guest', message : 'hi'})
expect(collection.find({}).count()).not.toBe(0 )
When runs in Meteor, it complains:
Error: TypeError: Cannot read property '_docs' of undefined
at [object Object].LocalCollection.Cursor._getRawObjects (/Users/user/WebstormProjects/mud-craft/.meteor/local/build/programs/server/packages/minimongo.js:512:18)
at [object Object].LocalCollection.Cursor.count (/Users/user/WebstormProjects/mud-craft/.meteor/local/build/programs/server/packages/minimongo.js:260:15)
at Object.<anonymous> (/Users/user/WebstormProjects/mud-craft/tests/jasmine/server/unit/sample_server_test.coffee:6:5)
But it's ok in product code.

Resources