Issue 968: NullReferenceException when uploading to a saved Panorama URI

Assigned To:Vagisha Sharma
Opened:2023-08-11 11:48 by Vagisha Sharma
Changed:2023-08-12 09:30 by Nick Shulman
2023-08-11 11:48 Vagisha Sharma
Title»NullReferenceException when uploading to a saved Panorama URI
Assigned To»Vagisha Sharma
Notify»Nick Shulman
Exception report:

This can happen if the Panorama user account configured in Skyline does not have read permission in the Panorama folder URI saved in the document. For example:
1. Document is uploaded to a folder as User1 who has the required permissions in the folder. This saves the Panorama folder URI in the document (<data_settings panorama_publish_uri=""...>).
2. The document is then opened in Skyline on another computer where the Panorama user is User2 who does not have read permissions in the folder.
Skyline will offer to upload the document to the previously saved URI. This results in a NRE because the JSON returned by the getContainer API is not as expected. The returned JSON is different depending on user permissions.

The exception in the report was likely caused due to the user having multiple accounts on PanoramaWeb with different permissions. One account, with write permissions, was used to upload the document to the Panorama folder. Then another instance of Skyline, with a different Panorama user, was used to upload the document to the same folder. But the second account did not have read permission in the folder.

2023-08-11 12:03 Vagisha Sharma
NotifyNick Shulman»Nick Shulman;Brendan MacLean
A couple of questions:
1. Do we need to show the user a message like "...The user account ( does not have permissions to upload to the folder..." before they can browse to select a new folder? Or, if folders[@"path"] is null then we just return false so the user will be taken directly to the PublishPanoramaDlg.
2. This should not be a common error, so is it OK to add the fix only in the master branch?

2023-08-12 09:30 Nick Shulman
I think Skyline should browse for a new folder without giving them any other message.
The user might not be aware that the .sky file remembers the last folder it was uploaded to, might not be the person who uploaded it before and might end up more confused by any warning message.

This fix does not need to be back ported to release branch. By default, any bug which has existed for more than an entire version does not need to be ported to a release branch.