Closed Kneemund closed 5 years ago
Hi @NiemandTV, thanks for reporting this! I'm looking into it, I'll let you know what's up as soon as I figure it out :)
I know where the error is, and it seems it's triggered because of a strange response from the Hosting API.
I just published a new version that should avoid this error, but in order to really figure this out I'm going to need some more information. Once the extension has updated for you (should be version 0.3.0) would you mind opening the dev tools and copying what's in there? Feel free to remove any identifyable information before you paste it here, I'm mostly interested in the shape of the object.
It's working as intended now :)
{
"name": "sites/[PROJECT-NAME]/releases/1554493521684419",
"type": "SITE_DISABLE",
"releaseTime": "2019-04-05T19:45:21.684419Z",
"releaseUser": {
"email": "[MYEMAIL]@gmail.com",
"imageUrl": "https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5Mzsjl-tnux3Or10Jq7Df1ZwIhkKAW0Q____________ARjbsIj-______8B/photo.jpg"
}
}
Ohhh, I see what's going on! I didn't take into account the SITE_DISABLE type of releases. I didn't know that those didn't include a version (the API docs make no mention of it) but I guess it makes sense that they don't. I'll include some extra checks for this particular case.
Thanks for your help debugging this!
Sorry, maybe not completely. If I disable Firebase Hosting this error pops up:
/C:/Users/[NAME]/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:2370 Error: Cannot read property 'name' of undefined
at Gt (C:\Users\[NAME]\.vscode\extensions\jsayol.firebase-explorer-0.3.1\dist\extension.js:441:45483)
at process._tickCallback (internal/process/next_tick.js:68:7)
onDidNotificationChange @ /C:/Users/[NAME]/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:2370
Only redeploying fixes it.
Huh, interesting. Going to look into it now.
Fixed! I just published a new version (0.3.2) solving this.
I also improved how the SITE_DISABLE releases are handled now, so you should see a bit more information.
When does it occur?
As soon as I select my Firebase project. Turning hosting on or off makes no difference.
What happens?
VS Code throws an error message and nothing is displayed in the "Hosting" section. I'd expect a message telling me why nothing is displayed like everywhere else. The error is displayed in the notification area.
Error
full error message from VS dev tools