Skip to content

Extension building problems #1230

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

Closed
1 of 3 tasks
csillag opened this issue May 25, 2014 · 4 comments · Fixed by #1322
Closed
1 of 3 tasks

Extension building problems #1230

csillag opened this issue May 25, 2014 · 4 comments · Fixed by #1322
Assignees
Milestone

Comments

@csillag
Copy link
Contributor

csillag commented May 25, 2014

I have tried to build and publish a new test extension, and encountered a bunch of problems.

  • when building an extensions which uses the local back-end:
    • when using static assets served from localhost:
      • with webassets.debug set to True, it works. (But it's quite different from what we can push to the web store.)
      • with webassets.debug set to False, I get this error when I try to deploy the extension over a page: GET http://localhost:5000/assets/app.html 404 (Not Found) Other assets are loaded successfully, only this one fails. (Of course this totally breaks the app.) This is problem no. 1.
    • when using bundled assets:
      • with webassets.debug set to True, it fails, because the JS library files are not copied into the extension. This is problem no. 2. (But maybe this is intended, since we are supposed to build with webassets.debug set to False?)
      • with webassets.debug set to False, it works.
  • when building an extensions which uses the production back-end:
    • when using bundled assets:
      • with webassets.debug set to False, after deploying it, I get exceptions like this:
TypeError: Cannot read property 'indexOf' of undefined
    at beginsWith (chrome-extension://lcknipjijijafjbionbfpoehnlfdknhh/public/lib/angular.min.js?0f082d1c:3:28748)
    at Object.LocationHtml5Url.$$parse (chrome-extension://lcknipjijijafjbionbfpoehnlfdknhh/public/lib/angular.min.js?0f082d1c:3:29266)
    at $LocationProvider.$get (chrome-extension://lcknipjijijafjbionbfpoehnlfdknhh/public/lib/angular.min.js?0f082d1c:4:1862)
    at Object.invoke (chrome-extension://lcknipjijijafjbionbfpoehnlfdknhh/public/lib/angular.min.js?0f082d1c:2:6901)
    at chrome-extension://lcknipjijijafjbionbfpoehnlfdknhh/public/lib/angular.min.js?0f082d1c:2:3744
    at getService (chrome-extension://lcknipjijijafjbionbfpoehnlfdknhh/public/lib/angular.min.js?0f082d1c:2:6390)
    at Object.invoke (chrome-extension://lcknipjijijafjbionbfpoehnlfdknhh/public/lib/angular.min.js?0f082d1c:2:6844)
    at chrome-extension://lcknipjijijafjbionbfpoehnlfdknhh/public/lib/angular.min.js?0f082d1c:2:16343
    at Array.forEach (native)
    at forEach (chrome-extension://lcknipjijijafjbionbfpoehnlfdknhh/public/lib/angular.min.js?0f082d1c:1:2483) 

This might or might not be related to angular/angular.js#4442. (At least the stack trace is the same.) This is problem no. 3

After some debugging, I realized that this is because the URL of the application has changed from https://hypothes.is/app to https://hypothes.is. (So problem no. 3 is solved.)

After using the new URL, I could finally build an extension that has the configuration required for actually pushing it to the chrome web store.

I am leaving this issue here as a memento to fix problem no. 1 and 2.

@csillag csillag added the bug label May 25, 2014
@tilgovi
Copy link
Contributor

tilgovi commented May 25, 2014

This isn't a bug, it's an enhancement.

Minifying without bundling and vice versa just isn't a supported build configuration.

@csillag
Copy link
Contributor Author

csillag commented May 25, 2014

Trying to use an unsupported configuration ought to result in an error message, instead of a broken build.

@jtremback
Copy link
Contributor

Hopefully contributors can handle an asset pipeline

@tilgovi
Copy link
Contributor

tilgovi commented May 25, 2014

We can also probably support this easily by switching on the asset URL instead of the debug setting.

So, I agree with this report more after thinking about it a minute.

Easy change.

@tilgovi tilgovi added this to the h 0.2 milestone Jun 4, 2014
@tilgovi tilgovi added enhancement and removed bug labels Jun 4, 2014
@tilgovi tilgovi added this to the 2014-08-08 milestone Jul 11, 2014
tilgovi added a commit that referenced this issue Jul 17, 2014
@tilgovi tilgovi self-assigned this Jul 17, 2014
tilgovi added a commit that referenced this issue Jul 18, 2014
tilgovi added a commit that referenced this issue Jul 18, 2014
tilgovi added a commit that referenced this issue Jul 18, 2014
tilgovi added a commit that referenced this issue Jul 18, 2014
tilgovi added a commit that referenced this issue Jul 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants