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

Changing default Video Cache location causes UnhandledPromiseRejectionWarning #74

Closed
dexfitz opened this issue Jan 17, 2021 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@dexfitz
Copy link

dexfitz commented Jan 17, 2021

Describe the bug
Changing the default location of the application causes the application to bug out and not run correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Download, extract and install v0.5.4
  2. Change the default cache location (Open Settings... > Video Cache > Move Location)
  3. Close the settings page.
  4. Screen saver does not run (black screen when triggered). Cannot select Settings or Preview.
  5. Application is still running (can be seen in Windows Task Manager).

Expected behavior
The application should not crash when default settings are changed.

Screenshots
Instead of screenshots, I am opting for debugging output, which I gathered by testing the application by using the command line (documented here):

C:\Download-Path\aerial-v0.5.4>aerial.scr /s

which gave the following error:

C:\Download-Path\aerial-v0.5.4>aerial.scr /s

C:\Download-Path\aerial-v0.5.4>
(node:6284) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, scandir 'C:\NEW-LOCATION\cache\temp'
    at Object.readdirSync (fs.js:854:3)
    at Object.fs.readdirSync (electron/js2c/asar.js:605:39)
    at Object.fs.readdirSync (electron/js2c/asar.js:605:39)
    at clearCacheTemp (C:\Download-Path\aerial-v0.5.4\resources\app\app.js:517:18)
    at startUp (C:\Download-Path\aerial-v0.5.4\resources\app\app.js:187:5)
(node:6284) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, scandir 'C:\NEW-LOCATION\cache\temp'
    at Object.readdirSync (fs.js:854:3)
    at Object.fs.readdirSync (electron/js2c/asar.js:605:39)
    at Object.fs.readdirSync (electron/js2c/asar.js:605:39)
    at clearCacheTemp (C:\Download-Path\aerial-v0.5.4\resources\app\app.js:517:18)
    at startUp (C:\Download-Path\aerial-v0.5.4\resources\app\app.js:187:5)
(node:6284) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6284) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6284) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:6284) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Aerial Version
aerial-v0.5.4

Additional context
In my case, I changed the default location of the cache folder, but the application did not create the temp folder under this cache folder. I manually created this temp folder and the application has been working as expected ever since.

@dexfitz dexfitz added the bug Something isn't working label Jan 17, 2021
@VasilisPat
Copy link
Contributor

VasilisPat commented Feb 13, 2021

Found the solution.

  • Uncheck "Immediately update video cache" option under Settings, Video Cache menu.
  • Create a subfolder inside the folder you have selected as cache location and name it temp

Please report your result, to confirm that it works.

@OrangeJedi You should add the function to create a new subfolder called temp to the new cache location in order to solve this issue, when a new update is rolled out. I think that by making this change, the problem reported in #63 and #64 (app not starting or multile instances are running but no visual change) will be also solved and Beta 0.5.4 version of the app will be working properly.

@OrangeJedi OrangeJedi added this to the v1.1.0 milestone Oct 6, 2022
@OrangeJedi
Copy link
Owner

This should be a quick fix, and it's embarrassing that an error like this got through. I'll include a patch with whatever the next release is.

@OrangeJedi OrangeJedi modified the milestones: v1.1.0, v1.0.1 Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants