Skip to content

Re-read asar package on page reload #1219

Closed

Description

@YurySolovyov

it can lead to artifacts otherwise, because it is probably reads file with old offset
image

Activity

  1. zcbenz commented on Mar 9, 2015

    @zcbenz
    Contributor

    The asar archive's meta information is only read for once and cached during app's whole life time, we should probably check the file's modification date before reading.

  2. dustinblackman commented on May 11, 2015

    @dustinblackman

    Is there a method to clear cache? I've run in the a similar problem.

  3. YurySolovyov commented on May 12, 2015

    @YurySolovyov
    ContributorAuthor

    Thanks a lot, development workflow is much better now.

  4. dustinblackman commented on May 12, 2015

    @dustinblackman

    Appreciated! Will give it a shot tonight.

  5. YurySolovyov commented on Aug 2, 2015

    @YurySolovyov
    ContributorAuthor

    Now the problem is that .asar file is blocked for overwriting while app is running
    /cc @zcbenz

    Edit:
    error looks like:

    { [Error: EBUSY: resource busy or locked, unlink 'D:\Projects\Quazar\new\client\runtime\resources\app.asar']
      cause:
       { [Error: EBUSY: resource busy or locked, unlink 'D:\Projects\Quazar\new\client\runtime\resources\app.asar']
         errno: -4082,
         code: 'EBUSY',
         syscall: 'unlink',
         path: 'D:\\Projects\\Quazar\\new\\client\\runtime\\resources\\app.asar' },
      isOperational: true,
      errno: -4082,
      code: 'EBUSY',
      syscall: 'unlink',
      path: 'D:\\Projects\\Quazar\\new\\client\\runtime\\resources\\app.asar' }
    
  6. zcbenz commented on Aug 3, 2015

    @zcbenz
    Contributor

    @YuriSolovyov This is intended, reloading page only re-read renderer process code, so updating the asar archive while app is running will result in the main process running old code while the renderer process running the new code, it is definitely going to cause troubles.

  7. YurySolovyov commented on Aug 3, 2015

    @YurySolovyov
    ContributorAuthor

    @zcbenz
    Why can't we re-read file on reload without locking it?
    Even if we can't restart browser process, it is fine, renderer process restart should work in most cases, since it is what usually gets updated (styles, images, scripts).

    This is a problem because it kind of breaks typical web development workfow like:
    change -> reload page -> check it

  8. valtersboze commented on Oct 27, 2016

    @valtersboze

    any solution to this? i ran in this locked file problem trying to push update to electron app, but cant overwrite asar file in windows, even with admin privileges (in linux sudo ./app solves permissions, file is not locked). need a way to push app.asar updates to clients

  9. daaru00 commented on Nov 29, 2016

    @daaru00

    +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions