IBM-Blockchain-Archive / car-lease-demo

A demonstration using IBM Blockchain to show how the lifecycle of vehicles can be recorded on a blockchain
Other
170 stars 300 forks source link

API 500 Error: /admin/identity [TypeError: Cannot read property 'getEnrolledMember' of undefined] #107

Open enbochen opened 7 years ago

enbochen commented 7 years ago

Tried to POST:http://localhost:8080/admin/identity with json body {"account":"Alfa_Romeo", "participantType":"Manufacturer"}, it will return 500 Internal Server Error. The docker log of application shows [TypeError: Cannot read property 'getEnrolledMember' of undefined].

This problem also happened with participants: Jaguar_Land_Rover, Beechvale_Group, Viewers_Alfa_Romeo, Every_Car_Leasing, Regionwide_Vehicle_Contracts, etc.. However, participants: Toyota, Milescape, LeaseCan, etc. can successfully logged in.

(Maybe it's the problem of securityContext.getEnrolledMember. securityContext is undefined.)

Thanks.

liam-grace commented 7 years ago

In order to use the REST api, you need to set a cookie in the request called user with the name of the participant you wish to use