ausecocloud / ecocloud

Issue tracker
6 stars 0 forks source link

Dropbox export: popup blocked #67

Open hoylen opened 5 years ago

hoylen commented 5 years ago

Exporting from JupyterLab to Dropbox does not work for me. The browser blocks the popup window from appearing. Note: it does not get blocked for Dropbox imports, so I can successfully import from Dropbox.

This is on Safari and Chrome on the Mac.

After being blocked, sometimes the text "Export to Dropbox" gets added to the bottom of the JupyterLab file browser (see attached screenshot).

screen shot 2018-10-29 at 11 46 07 am

gweis commented 5 years ago

Ok…

The progress bar should not appear. (I’ll look into that one as well)

However, I can see the little 'popup blocked icon’ in your address bar ;)

Cheers,

Gerhard

On 29 Oct 2018, at 11:51 am, Hoylen Sue notifications@github.com wrote:

Exporting from JupyterLab to Dropbox does not work for me. The browser blocks the popup window from appearing. Note: it does not get blocked for Dropbox imports, so I can successfully import from Dropbox.

This is on Safari and Chrome on the Mac.

After being blocked, sometimes the text "Export to Dropbox" gets added to the bottom of the JupyterLab file browser (see attached screenshot).

https://user-images.githubusercontent.com/1381377/47625398-a96b4600-db70-11e8-8a6c-f62ddd79645f.png — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ausecocloud/ecocloud/issues/67, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIevyOrelP5LuYIW7NPH_GjxCaysJFQks5upl8mgaJpZM4X-U5n.

hoylen commented 5 years ago

Well spotted. Good. That's a workaround: click on the icon and tell it not to block popups from that hostname.

It works on Chrome, but in Safari the popup window appears, but with a "Could not communicate with https://jupyter.ecocloud.org.au" error message. screen shot 2018-10-29 at 12 02 18 pm

gweis commented 5 years ago

Confirmed,... I see the same issue.

Clicking on the export link a 2nd time opens the popup.

It seems like, the first click enables the popup and opens it, but something goes wrong then. Maybe some parameters are not being passed on after allowing the first popup.

Still the export progress bar hangs around though. I"ll have to check the error code we get back and make sure that the progress bar only starts if a user hit's save in the dropbox popup.

hoylen commented 5 years ago

Yes, the dialog box appears when I tried it again. I'll document "trying twice" as a workaround to that error message.

I'm currently testing to see what happens if you import/export a file with the same name that is already there.

a. It doesn't show a warning or ask what the user wants to do. b. Export to Dropbox creates an extra file with (1), (2), etc. added to the filename. c. Importing to JupyterLab simply overwrites the existing file.

Is this the behaviour we want (or can live with)?

gweis commented 5 years ago

Yes, that's the behaviour ... I am not sure whether we can overwrite files on the dropbox side. So (b) may not be changeable by us.

(a) and (b) ... that's probably something to think about. We have full flexibility there.

hoylen commented 5 years ago

I've documented the current behaviour, so just let me know if it changes.

I'm favouring consistency, so maybe we should make JupyterLab rename the files in the same way Dropbox does. Though we will have to figure out how their algorithm behaves in edge cases (e.g. if there are multiple files being uploaded, or some numbers already exist).

And if export can't prompt about clashes, then import should not prompt for consistency. I've noticed that terminating a server from the Dashboard also doesn't prompt "are you sure", so it is consistent with that too :-)

gweis commented 5 years ago

Safari is a bit special here ... looking at the logs I can see this error message after allowing popups.

Unhandled Promise Rejection: Error: Failed to open/load the window. Dropbox.choose and Dropbox.save should only be called from within a user-triggered event handler such as a tap or click event.

Seems like the handler that opens the popup, is not valid. This needs to be catched inside the dropbox dropin.js. Not much we can do about it.

gweis commented 5 years ago

fix for progress bar deployed to test