sap-labs-france / ev-dashboard

The Open e-Mobility Charging Station management front-end Angular application (check also ev-server and ev-mobile)
https://open-e-mobility.fr/
Apache License 2.0
72 stars 103 forks source link

TypeError: Cannot read property 'currentTransactionID' of undefined #2052

Closed jerome-benoit closed 4 years ago

jerome-benoit commented 4 years ago
core.js:6241 ERROR TypeError: Cannot read property 'currentTransactionID' of undefined
    at SafeSubscriber._next (table-charging-stations-stop-transaction-action.ts:45)
    at SafeSubscriber.__tryOrUnsub (Subscriber.js:183)
    at SafeSubscriber.next (Subscriber.js:122)
    at Subscriber._next (Subscriber.js:72)
    at Subscriber.next (Subscriber.js:49)
    at CatchSubscriber._next (Subscriber.js:72)
    at CatchSubscriber.next (Subscriber.js:49)
    at RetryWhenSubscriber._next (Subscriber.js:72)
    at RetryWhenSubscriber.next (Subscriber.js:49)
    at MapSubscriber._next (map.js:35)
LucasBrazi06 commented 4 years ago

Where did you get this issue from?

jerome-benoit commented 4 years ago

Where did you get this issue from?

Locally after stress tests with ev-simulator (violent shutdown during transaction, lots of transaction on 10 connectors charging stations or lot of charging stations, etc): the simulator is able to create reproducibly transaction that cannot be stopped with various inconsistencies.

LucasBrazi06 commented 4 years ago

Here I don't see how the connectorID can be unknown. Are you be sure that the ev-simulator performs realistic scenarios and it's bug free?

jerome-benoit commented 4 years ago

Here I don't see how the connectorID can be unknown. Are you be sure that the ev-simulator performs realistic scenarios and it's bug free?

No, but I'm sure that the undefined field cannot be related to the ev-simulator code: it just returns data that it has received from the server for transaction information.
And the goal of a stress test is not to produce realistic scenarii, it's to do stuff that are not expected, just like a fuzzer try to inject strings on public inputs to trigger application misbehave or bug.

Whatever is the tool, it should not be able to create such inconsistencies and stress tools are here to discover them. And sometimes it permits to fix important issue ;)

LucasBrazi06 commented 4 years ago

No, but I'm sure that the undefined field cannot be related to the ev-simulator code: it just returns data that it has received from the server for transaction information.

transaction.connectorId cannot reference an unknown connector, and moreover it's in the UI not in the backend.

And the goal of a stress test is not to produce realistic scenarii, it's to do stuff that are not expected, just like a fuzzer try to inject strings on public inputs to trigger application misbehave or bug.

I don't agree, the first goal of the ev-simulator is to provide load test with clean OCPP requests, stick to that.

jerome-benoit commented 4 years ago

No, but I'm sure that the undefined field cannot be related to the ev-simulator code: it just returns data that it has received from the server for transaction information.

transaction.connectorId cannot reference an unknown connector, and moreover it's in the UI not in the backend.

The data comes from the backend. And just by using the OCPP-J server, I’ve been able to create them with proper OCPP requests. I think it worth investigating only if time permits.

And the goal of a stress test is not to produce realistic scenarii, it's to do stuff that are not expected, just like a fuzzer try to inject strings on public inputs to trigger application misbehave or bug.

I don't agree, the first goal of the ev-simulator is to provide load test with clean OCPP requests, stick to that.

The kind of (light) stress testing code was already there (done by Florent), I do not have time to add that kind of features. I’ve just enable it from time to time to test the changes I’ve made in ev-simulator.

The only changes I’ve made to the simulator are related to my work needs:

Its future usage or why stress testing API or inputs is a good practice should be discussed during a meeting.

-- Jérôme Benoit aka fraggle Piment Noir - https://piment-noir.org OpenPGP Key ID : 27B535D3 Key fingerprint : B799 BBF6 8EC8 911B B8D7 CDBC C3B1 92C6 27B5 35D3

LucasBrazi06 commented 4 years ago

Its future usage or why stress testing API or inputs is a good practice should be discussed during a meeting.

Ok, we need to review the existing code in the simulator. Ok to discuss it during a meeting! Thanks Jerome.