Uncaught TypeError when loading rides and route

Dieter Koblenz4 years ago

Hi,

I can't seem to load the past rides and routes of my devices. I receive the following error in Chrome console.

app.min.js:49 Uncaught TypeError: Cannot read property 'get' of null
    at g.convertValue (app.min.js:49)
    at F.speedConverter [as convert] (app.min.js:6)
    at Function.eval [as initializeFn] (eval at makeInitializeFn (ext-all.js:22), <anonymous>:33:12)
    at g.constructor (ext-all.js:22)
    at new g (ext-all.js:22)
    at F.defaultRecordCreator (ext-all.js:22)
    at F.extractRecord (ext-all.js:22)
    at F.extractData (ext-all.js:22)
    at F.extractData (ext-all.js:22)
    at F.readRecords (ext-all.js:22)

On the modern interface, I am able to load the rides without a problem.

Anton Tananaev4 years ago

Try debug version of the web app by opening debug.html. it should give a more readable stack trace.

Dieter Koblenz4 years ago

When I log in, I get an immediate error:

SpeedUnits.js:42 Uncaught TypeError: Cannot read property 'get' of null
    at constructor.convertValue (SpeedUnits.js:42)
    at constructor.speedConverter [as convert] (AttributeFormatter.js:39)
    at Function.eval [as initializeFn] (eval at makeInitializeFn (ext-all-debug.js:85658), <anonymous>:132:13)
    at constructor (ext-all-debug.js:82894)
    at new constructor (ext-all-debug.js:13136)
    at eval (eval at getInstantiator (ext-all-debug.js:15045), <anonymous>:3:8)
    at Object.create (ext-all-debug.js:15489)
    at constructor.updatePositions (Root.js:318)
    at WebSocket.socket.onmessage (Root.js:284)

When I load a route (history: this week):

SpeedUnits.js:42 Uncaught TypeError: Cannot read property 'get' of null
    at constructor.convertValue (SpeedUnits.js:42)
    at constructor.speedConverter [as convert] (AttributeFormatter.js:39)
    at Function.eval [as initializeFn] (eval at makeInitializeFn (ext-all-debug.js:85658), <anonymous>:132:13)
    at constructor (ext-all-debug.js:82894)
    at new constructor (ext-all-debug.js:13136)
    at constructor.defaultRecordCreator (ext-all-debug.js:86598)
    at constructor.extractRecord (ext-all-debug.js:86549)
    at constructor.extractData (ext-all-debug.js:86505)
    at constructor.callParent (ext-all-debug.js:12493)
    at constructor.extractData (ext-all-debug.js:90454)
Dieter Koblenz4 years ago

Have tried to debug further, but it remains difficult. It's trying to convert a value which is empty?

Anton Tananaev4 years ago

Maybe attributes are null/undefined?

Dieter Koblenz4 years ago

I don't have any (custom) attributes defined, related mysql sheets are empty.

Device attributes example:

{"batteryLevel":100.0,"distance":9634.51,"totalDistance":1781079.72,"motion":true}

I've tried making an export, and it works. In xlsx all the items are not null.

Anton Tananaev4 years ago

I guess you can just debug it directly from the web browser and see what's missing.

Dieter Koblenz4 years ago

I can't find it. The following is the maximum amount of feedback I receive, and this is on the debug page.

SpeedUnits.js:42 Uncaught TypeError: Cannot read property 'get' of null
    at constructor.convertValue (SpeedUnits.js:42)
    at constructor.speedConverter [as convert] (AttributeFormatter.js:39)
    at Function.eval [as initializeFn] (eval at makeInitializeFn (ext-all-debug.js:85658), <anonymous>:132:13)
    at constructor (ext-all-debug.js:82894)
    at new constructor (ext-all-debug.js:13136)
    at eval (eval at getInstantiator (ext-all-debug.js:15045), <anonymous>:3:8)
    at Object.create (ext-all-debug.js:15489)
    at constructor.updatePositions (Root.js:318)
    at WebSocket.socket.onmessage (Root.js:284)
convertValue @ SpeedUnits.js:42
speedConverter @ AttributeFormatter.js:39
eval @ VM5183:132
constructor @ ext-all-debug.js:82894
constructor @ ext-all-debug.js:13136
eval @ VM4299:3
create @ ext-all-debug.js:15489
updatePositions @ Root.js:318
socket.onmessage @ Root.js:284

In the database, nothing seems missing, and on the beta new dashboard I cán retrace the route..

Anton Tananaev4 years ago

I meant literally debug the code and check the values.