tomaskovacik / MeetEasier

MeetEasier is a web application that visualizes meeting room availability. It works using Exchange Web Services (EWS) with Exchange room lists in Office 365.
GNU General Public License v3.0
1 stars 1 forks source link

token cache is broken after a while #7

Open tomaskovacik opened 2 years ago

tomaskovacik commented 2 years ago

start node server

Started on port: 8888 undefined:1 {"Account":{},"IdToken":{},"AccessToken":{"-login.windows.net-accesstoken-xxxxxxxxxxxxxxxxx-.default openid profile offline_access--":{"home_account_id":"","environment":"login.windows.net","credential_type":"AccessToken","client_id":"xxxxxxxxxxxxxx","secret":"xxxxxxxxxxxxxxxxxxx","realm":"xxxxxxxx","target":".default openid profile offline_access","cached_at":"1659979348","expires_on":"1659982946","extended_expires_on":"1659986545","token_type":"Bearer"}},"RefreshToken":{},"AppMetadata":{}}":{}}

SyntaxError: Unexpected string in JSON at position 2169 at JSON.parse () at TokenCache.deserialize (/mnt/APA/src/MeetEasier/node_modules/@azure/msal-node/dist/msal-node.cjs.development.js:1546:92) at /mnt/APA/src/MeetEasier/app/msgraph/cachePlugin.js:19:31 at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:71:3)

tomaskovacik commented 2 years ago

removing ":{}} will make json correct again

fast fix is run in loop with removing cache after fail of npm"

while true; do npm start || rm -f data/cache.json; done