question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ng build --prod forces background url parameters to alphabetical order

See original GitHub issue

Bug Report or Feature Request (mark with an x)

- [x] bug report
- [ ] feature request

Versions.

@angular/cli: 1.0.4 node: 7.10.0 os: darwin x64 @angular/common: 4.1.3 @angular/compiler: 4.1.3 @angular/core: 4.1.3 @angular/forms: 4.1.3 @angular/http: 4.1.3 @angular/platform-browser: 4.1.3 @angular/platform-browser-dynamic: 4.1.3 @angular/router: 4.1.3 @angular/cli: 1.0.4 @angular/compiler-cli: 4.1.3

Repro steps.

When running ng build --prod, query parameters of background-image URLs in my scss file are not maintained in the same order they were.

The log given by the failure.

Original line in scss file:

background: url('https://fnbfb.imgix.net/https%3A%2F%2Ffirebasestorage.googleapis.com%2Fv0%2Fb%2Ffamilinb-web.appspot.com%2Fo%2FUnused%2520-%252054148193_xxl.jpg%3Falt%3Dmedia%26token%3D25f08c08-ed7d-4b3b-a041-4368f8d8d451?auto=format&fit=crop&w=600&h=400&expires=1496488841&s=3bdd3f89855db0ee92aaa2db61f3ffe4')

Line in main.xxx.bundle.js:

background:url(https://fnbfb.imgix.net/https%3A%2F%2Ffirebasestorage.googleapis.com%2Fv0%2Fb%2Ffamilinb-web.appspot.com%2Fo%2FUnused%20-%2054148193_xxl.jpg%3Falt%3Dmedia%26token%3D25f08c08-ed7d-4b3b-a041-4368f8d8d451?auto=format&expires=1496488841&fit=crop&h=400&s=3bdd3f89855db0ee92aaa2db61f3ffe4&w=600)

Desired functionality.

If the order is not maintained, imgix does not validate the signature. Also, the s parameter has to go in the end.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
clydincommented, Jan 19, 2018

This no longer happens in 1.7 (currently in beta). But fixed is really the inappropriate word. As explained above and more completely by @metaloha , this is really an issue with the service being used and not the act of alphabetizing or otherwise sorting the parameters. Note also that a future optimizer/minifier could be used that again does so.

1reaction
clydincommented, May 24, 2017

This seems more like a defect with the signature checking process. Relying on query parameter order doesn’t seem like the best idea and the signature validation could be changed to handle order independence.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular minification with css and URL background image only ...
When I take out the url, it seems to work find in prod mode (I get background-size and background-position). Its like it's merging...
Read more >
Image Transformations for Developers - Cloudinary
Learn how to dynamically transform images with one line of code: crop, resize, add borders and background, face detection, rich image ...
Read more >
ARMY FORCE MANAGEMENT MODEL
Section III—Force Development Phase I—Develop Capability Requirements . ... Examine how the Army uses three distinct subsystems: production; combat, and.
Read more >
Google - Wikipedia
Google LLC is an American multinational technology company focusing on search engine technology, online advertising, cloud computing, computer software, ...
Read more >
2017 ACC/AHA/AAPA/ABC/ACPM/AGS/APhA/ASH/ASPC ...
The ACC/AHA Task Force on Clinical Practice Guidelines (Task Force) continuously reviews, updates, and modifies guideline methodology on the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found