Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when attempting to download file from FileSafe #562

Open
AdamVig opened this issue May 26, 2019 · 7 comments

Comments

Projects
None yet
2 participants
@AdamVig
Copy link

commented May 26, 2019

When I attempt to preview a FileSafe file, it fails and I see the following two errors in my brower's console:

Default Rails 500 error page
Request error: 
<!DOCTYPE html>
<html>
<head>
  <title>We're sorry, but something went wrong (500)</title>
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <style>
  .rails-default-error-page {
    background-color: #EFEFEF;
    color: #2E2F30;
    text-align: center;
    font-family: arial, sans-serif;
    margin: 0;
  }

.rails-default-error-page div.dialog {
width: 95%;
max-width: 33em;
margin: 4em auto 0;
}

.rails-default-error-page div.dialog > div {
border: 1px solid #CCC;
border-right-color: #999;
border-left-color: #999;
border-bottom-color: #BBB;
border-top: #B00100 solid 4px;
border-top-left-radius: 9px;
border-top-right-radius: 9px;
background-color: white;
padding: 7px 12% 0;
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
}

.rails-default-error-page h1 {
font-size: 100%;
color: #730E15;
line-height: 1.5em;
}

.rails-default-error-page div.dialog > p {
margin: 0 0 1em;
padding: 1em;
background-color: #F7F7F7;
border: 1px solid #CCC;
border-right-color: #999;
border-left-color: #999;
border-bottom-color: #999;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-top-color: #DADADA;
color: #666;
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
}
</style>
</head>

<body class="rails-default-error-page">
<!-- This file lives in public/500.html -->
<div class="dialog">
<div>
<h1>We're sorry, but something went wrong.</h1>
</div>
<p>If you are the application owner check the logs for more information.</p>
</div>
</body>
</html>
dist.js:7725:51S

TypeError: fileData is undefined dist.js:1761:19

In the app, too, I found that FileSafe downloads were not working. I only have two files in FileSafe and they are both associated with the same note. I saw the same errors with both of them.

I'm using the Standard Notes app on Windows 10 and Standard Notes web in Firefox.

@mobitar

This comment has been minimized.

Copy link
Member

commented May 27, 2019

A few questions:

  1. Is this for both previewing and downloading? Or just previewing?
  2. When were the files uploaded?
  3. What happens when you upload a new file and attempt to download/preview it?
  4. Have you made any changes to your FileSafe keys/integrations recently? This can include changes via the Batch Manager, or the extension itself.
@AdamVig

This comment has been minimized.

Copy link
Author

commented May 27, 2019

Hi Mo, thanks for your reply.

  1. Yes, both previewing and downloading.
  2. The files were uploaded a few months ago. I could not find an upload date in the app, but my FileSafe key was created on February 18, 2019. I think these are the first files I uploaded with FileSafe, so they were probably uploaded at around that time.
  3. When I attempt to upload a file via the app, I see "Error uploading file." With a small file, this happened almost immediately. With a larger file, it loaded for a few seconds before showing the error. In the browser, I get the same error, and the console shows the following error (in addition to the aforementioned Rails 500 error page):
fs-embed | error uploading file: 
Object { message: "File upload failed." }
dist.js:2992:39
    _callee8$/< https://extensions.standardnotes.org/assets/sn-filesafe/dist/dist.js:2992
  1. No, I have not made any changes to my FileSafe keys or integrations. The app says that my key was created on February 18, 2019.
@mobitar

This comment has been minimized.

Copy link
Member

commented May 27, 2019

Gotcha, so this definitely seems to be an issue with failed communication with the underlying API. I do see some exception reports with the Google API on my end regarding this. Is your integration Google Drive? Have you made any changes to your permissions recently?

Can you open your Google Drive, and make sure the FileSafe folder exists and contains your 2 items?

You can then drag one of the encrypted items onto the FileSafe bar, and it should decrypt it for you, as a temporary measure to get access to your file while we figure out what's going on with the API.

@AdamVig

This comment has been minimized.

Copy link
Author

commented May 27, 2019

Yes, my integration is Google Drive. I don't think I made any recent changes to permissions. I still see Standard Notes in my Google account's list of third-party apps with account access.

The files exist in my Google Drive. When I drag and drop them onto the FileSafe panel, I get an endless "Decrypting..." spinner in both the app and the browser. In the browser, the following message appears in the console after I drop the file onto the app:

Decryption error: TypeError: item is undefined EncryptionWorker.js:13939:15

The file I tested with was a 1,282 KB .pdf.sf.json file. I waited about ten minutes before giving up.

@mobitar

This comment has been minimized.

Copy link
Member

commented May 28, 2019

I'm able to replicate the decryption issue. Must be a regression with the last release a few days ago. I'll look into this. As for the permissions issue, until I gather more information, your best bet is to delete the integration and re-add it. This will keep all your files intact.

@AdamVig

This comment has been minimized.

Copy link
Author

commented May 28, 2019

I'm glad you are able to replicate the issue.

After deleting and adding back the Google Drive integration, I am able to download files from FileSafe again.

One note on that process: after deleting the Google Drive integration in the app (on macOS, if it matters), the FileSafe panel in all of my notes went blank. I restarted the app, but the panel was still blank. I then opened Standard Notes in the browser and found that the FileSafe panel was working normally there, which enabled me to add back the Google Drive integration.

@mobitar

This comment has been minimized.

Copy link
Member

commented May 29, 2019

Any chance you could see what the exception in the console was when it turned blank?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.