Vulcanize generated file generates lots of errors

I am trying to get vulcanize to work but am having very little luck.

Is your webcomponets.js up to date? This sounds like https://github.com/webcomponents/webcomponentsjs/issues/180, which should be fixed in 0.6.0

I am still experiencing this issue. It's wierd though in chrome it gives me Uncaught Already registered (Polymer) prototype for element core-a11y-keys but in safari it gives TypeError: undefined is not a function (evaluating 'Polymer.mixin') currently I have to use this config to get any somewhat working results
{
  "excludes": {
    "imports": [
      "polymer.html"
    ]
  },
  "strip-excludes": false
}

I should note that even though chrome spews out the already registered error my app still loads but in safari it does not do anything.

Can you update your node_modules and try again? The latest hydrolysis release should fix your issue.

I'm having a similar issue - the components all run fine before vulcanization, but then throw hundreds of errors after vulcanizing. I'm using hydrolysis 1.15, and webcomponents 0.7.11.
Uncaught NotSupportedError: Failed to execute 'registerElement' on 'Document': Registration failed for type 'dom-module'. A type with that name is already registered.
Uncaught TypeError: Polymer.Base._getExtendedPrototype is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught SyntaxError: Unexpected token <
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught SyntaxError: Unexpected token <
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: Polymer.Base._getExtendedPrototype is not a function
Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
Uncaught TypeError: Polymer.Base._getExtendedPrototype is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught SyntaxError: Unexpected token <
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught SyntaxError: Unexpected token <
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught SyntaxError: Unexpected token <
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught SyntaxError: Unexpected token <
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught SyntaxError: Unexpected token <
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught SyntaxError: Unexpected token <
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught SyntaxError: Unexpected token <
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught SyntaxError: Unexpected token <
Uncaught TypeError: Cannot read property '_importsLoaded' of undefined
Uncaught TypeError: Cannot read property '_importsLoaded' of undefined
Uncaught Error: Expected template or null, found: [object Object]
Uncaught NotSupportedError: Failed to execute 'registerElement' on 'Document': Registration failed for type 'dom-module'. A type with that name is already registered.
Uncaught TypeError: Polymer.Base._getExtendedPrototype is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught SyntaxError: Unexpected token <
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught SyntaxError: Unexpected token <
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: Polymer.Base._getExtendedPrototype is not a function
Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
Uncaught TypeError: Polymer.Base._getExtendedPrototype is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught TypeError: this._prepIs is not a function
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught SyntaxError: Unexpected token <
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught SyntaxError: Unexpected token <
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught Error: You tried to use polymer without loading it first. To load polymer,
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught SyntaxError: Unexpected token <
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught SyntaxError: Unexpected token <
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught SyntaxError: Unexpected token <
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught SyntaxError: Unexpected token <
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught SyntaxError: Unexpected token <
Uncaught ReferenceError: SYMBOL_ITERATOR is not defined
Uncaught TypeError: Cannot read property 'instanceCount' of undefined
Uncaught SyntaxError: Unexpected token <
Uncaught TypeError: Cannot read property '_importsLoaded' of undefined
Uncaught TypeError: Cannot read property '_importsLoaded' of undefined
Uncaught Error: Expected template or null, found: [object Object]

I'm experiencing the same issue as above. "All of a sudden" vulcanized elements using gulp serve:dist from Polymer Starter Kit project  (slightly modified) gives above errors:
Uncaught NotSupportedError: Failed to execute 'registerElement' on 'Document': Registration failed for type 'dom-module'.
Uncaught NotSupportedError: Failed to execute 'registerElement' on 'Document': Registration failed for type 'dom-module'. A type with that name is already registered.
elements.vulcanized.html:14252 Uncaught TypeError: Polymer.Base._getExtendedPrototype is not a function
elements.vulcanized.html:1078 Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
elements.vulcanized.html:19366 Uncaught TypeError: this._prepIs is not a function
2elements.vulcanized.html:1078 Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
elements.vulcanized.html:19366 Uncaught TypeError: this._prepIs is not a function
2elements.vulcanized.html:1078 Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
19elements.vulcanized.html:19366 Uncaught TypeError: this._prepIs is not a function
elements.vulcanized.html:1078 Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
elements.vulcanized.html:19366 Uncaught TypeError: this._prepIs is not a function
elements.vulcanized.html:1078 Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
11elements.vulcanized.html:19366 Uncaught TypeError: this._prepIs is not a function
elements.vulcanized.html:1078 Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
14elements.vulcanized.html:19366 Uncaught TypeError: this._prepIs is not a function
elements.vulcanized.html:1078 Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
4elements.vulcanized.html:19366 Uncaught TypeError: this._prepIs is not a function
3elements.vulcanized.html:1078 Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
4elements.vulcanized.html:19366 Uncaught TypeError: this._prepIs is not a function
elements.vulcanized.html:1078 Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
5elements.vulcanized.html:19366 Uncaught TypeError: this._prepIs is not a function
polymer-micro.html:254 Uncaught NotSupportedError: Failed to execute 'registerElement' on 'Document': Registration failed for type 'dom-module'. A type with that name is already registered.
polymer-micro.html:64 Uncaught TypeError: Polymer.Base._getExtendedPrototype is not a function
elements.vulcanized.html:1078 Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
2polymer.html:3135 Uncaught TypeError: this._prepIs is not a function
elements.vulcanized.html:1078 Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
polymer.html:3135 Uncaught TypeError: this._prepIs is not a function
elements.vulcanized.html:1078 Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
3polymer.html:3135 Uncaught TypeError: this._prepIs is not a function
5elements.vulcanized.html:1078 Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
elements.vulcanized.html:12203 Uncaught TypeError: Cannot read property 'cancel' of null
7polymer.html:3135 Uncaught TypeError: this._prepIs is not a function
elements.vulcanized.html:1078 Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
polymer.html:3135 Uncaught TypeError: this._prepIs is not a function
polymer.html:153 Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined

+1

I fix it replacing every html import of my components to elements.html

And importing there the html I needed.
I know is not the best pratice but solved my problem.

@emersonbottero i dont get your solution, can you rephrase?

I think I understood @emersonbottero:
I imported a html fil in app/index.html
When I moved that import over to elements.html instead, the error messages disappeared.

@me97esn Thanks for the clarification. I tried it and it didn't work. however, i managed to come out with a work around.
I first ran gulp serve on my website.
Then i copied the contents of the app folder in my project into a new folder.
I then copied the contents of the .tmp folder into the same folder.
Finally, I copied the bower components folder into the new folder.
When i ran the serve with the contents of the new folder, it worked fine (Distribution/Server Upload ready)

It worked out for you @me97esn ?
Shouldn't this be marked as a Bug or at least doc improvement?

+1. Can't put my vulcanized Polymer Starter Kit based site to work. I'm always receiving these messages:
Failed to execute 'registerElement' on 'Document': Registration failed for type 'dom-module'. A type with that name is already registered.

@vinerz I fix it replacing every html import of my components to elements.html
I think it happens when you have the same import in 2 places. It shouldn't but it happens.

@emersonbottero, I've managed to fix by removing a reference to Polymer.html that somehow resolved to another path. Maybe because I'm using symlinks.

I had a similar issue, for me it seemed to by a case mismatch:
/components/Polymer/Polymer.html and ../polymer/polymer.html causing it to load twice.

I had this problem as well and noticed that I had an extra "include/import" link in my index.html. I moved all of those links into elements.html and the gulp serve:dist worked just fine again. I noticed
<!-- Because this project uses vulcanize this should be your only html import        in this file otherwisegulp vulcanizeandgulp serve:dist will not work properly        and Polymer JavaScript errors we be thrown. All other imports should go in elements.html -->
comment in the original index.html. I think this was the warning to put other 's in the original index.html but to instead use elements.html.

This issue seems to be related to project layout and duplicate HTML imports. I'm happy to reopen it if provided with a reduced test case, but for now I'm going to mark this working as intended.

The common point that you got different traverse (joint paths) to the same file (from A to C):
originaly
  A (Polymer)
 /                   \

B1(elements) -- B2 (app)
\                 / (error)
C (index)
resulting in 2 different paths
A-B1,B1-C, B2-B1
A-B2, B2-C --> which leads to import set {A, B1} as well as set {A, B2, B1} as requrements for C by two different paths (A->B2)->C and (A->B2-B1)->C
Look in comparison to diagram below,
     A (Polymer)
  /                |

B2 (app)      |
|         \    |
|            B1 (elements)
|          /
C (index)
resulting in single path
A-B1, A->B2, B2->B1, B1-C, B2-C (removed) --> leads to import single set {A, B2, B1} as the requrements for C
So, to correct this you have to remove a links between B2 and B1.
Indeed, this error is relatively hard to find, so check it out, brainer!
And happy coding!
--- index.html --- (C)

 ****

--- index.html ---
--- elements/elements.html --- (B2)

--- elements/elements.html ---
--- elements/app.html --- (B1)

--- elements/app.html ---
--- bower_components/polymer.html --- (A)

--- bower_components/polymer.html ---

I seem to be running into this.
This import set:
    <script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>

    <link rel="import" href="bower_components/polymer/polymer.html"/>

    <link rel="import" href="bower_components/paper-toggle-button/paper-toggle-button.html"/>
    <link rel="import" href="bower_components/paper-checkbox/paper-checkbox.html"/>
    <link rel="import" href="bower_components/paper-toast/paper-toast.html"/>
    <link rel="import" href="bower_components/paper-input/paper-input.html"/>
    <link rel="import" href="bower_components/paper-input/paper-textarea.html"/>
    <link rel="import" href="bower_components/paper-spinner/paper-spinner.html"/>
    <link rel="import" href="bower_components/paper-slider/paper-slider.html"/>
    <link rel="import" href="bower_components/paper-menu/paper-menu.html"/>
    <link rel="import" href="bower_components/paper-card/paper-card.html"/>
    <link rel="import" href="bower_components/paper-dialog/paper-dialog.html"/>
    <link rel="import" href="bower_components/paper-dialog-scrollable/paper-dialog-scrollable.html"/>
    <link rel="import" href="bower_components/paper-button/paper-button.html"/>
    <link rel="import" href="bower_components/paper-icon-button/paper-icon-button.html"/>
    <link rel="import" href="bower_components/paper-fab/paper-fab.html"/>
    <link rel="import" href="bower_components/paper-item/paper-item.html"/>
    <link rel="import" href="bower_components/paper-material/paper-material.html"/>
    <link rel="import" href="bower_components/paper-progress/paper-progress.html"/>
    <link rel="import" href="bower_components/paper-badge/paper-badge.html"/>

    <link rel="import" href="bower_components/paper-radio-group/paper-radio-group.html"/>
    <link rel="import" href="bower_components/paper-radio-button/paper-radio-button.html"/>

    <link rel="import" href="bower_components/gold-email-input/gold-email-input.html"/>
    <link rel="import" href="bower_components/gold-phone-input/gold-phone-input.html"/>

    <link rel="import" href="bower_components/iron-form/iron-form.html"/>
    <link rel="import" href="bower_components/iron-autogrow-textarea/iron-autogrow-textarea.html"/>
    <link rel="import" href="bower_components/font-roboto/roboto.html"/>
    <link rel="import" href="bower_components/iron-icons/iron-icons.html"/>
    <link rel="import" href="bower_components/iron-icons/image-icons.html"/>
    <link rel="import" href="bower_components/iron-icons/social-icons.html"/>
    <link rel="import" href="bower_components/iron-icons/editor-icons.html"/>
    <link rel="import" href="bower_components/iron-icons/av-icons.html"/>
    <link rel="import" href="bower_components/iron-icons/maps-icons.html"/>
    <link rel="import" href="bower_components/iron-icons/communication-icons.html"/>

    <link rel="import" href="polymer-elements/copyright-statement.html"/>
    <link rel="import" href="polymer-elements/glyphicon-social-icons.html"/>

    <link rel="import" href="bower_components/neon-animation/neon-animation.html"/>

    <link rel="import" href="bower_components/marked-element/marked-element.html"/>

    <link rel="import" href="bower_components/google-map/google-map.html"/>
    <link rel="import" href="bower_components/google-map/google-map-marker.html"/>
    <link rel="import" href="bower_components/google-map/google-map-poly.html"/>

has no duplicates but upon vulcanization, the code explodes:

Here's a live sample ---
Pre-Vulcanization: https://amphibiandisease.org/project.php?id=0082cd8e99af65028f4ec3c3910edbd4
Post-Vulcanization: https://amphibiandisease.org/project-vulcanized.php?id=0082cd8e99af65028f4ec3c3910edbd4
Full Template: https://github.com/AmphibiaWeb/amphibian-disease-tracker/blob/master/pre-vulcanize.html
Extracted <by-vulcanize> node: https://raw.githubusercontent.com/AmphibiaWeb/amphibian-disease-tracker/master/modular/vulcanized-div-and-dom-module.html

@tigerhawkvok You might have solved this by now - but that issue is due to polymer.html being included more than once. You're including it at the top of your script, and then some/all of the components will be  including it too.
Because Vulcanize simply inline's every include, polymer.html get's included twice and therefore errors. You can exclude it from the vulcanize process, and keep it as an include.

@TomFoyster thanks for the note, I know it was ages ago but my tests have been failing for hours with really obscure messages and the culprit was as you say duplicate inclusion of polymer.html


Try simplified export from private key

Description

`gen_ec_pub_key` raises a "pkeys are immutable on OpenSSL 3.0 for kitchen-tests
Stack trace:
       >>>> Caused by OpenSSL::PKey::PKeyError: pkeys are immutable on OpenSSL 3.0
       /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-19.0.2/lib/chef/mixin/openssl_helper.rb:178:in `public_key='
       /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-19.0.2/lib/chef/mixin/openssl_helper.rb:178:in `gen_ec_pub_key'
       /opt/chef/embedded/lib/ruby/3.1.0/forwardable.rb:238:in `gen_ec_pub_key'
       /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-19.0.2/lib/chef/resource/openssl_ec_public_key.rb:80:in `block in <class:OpensslEcPublicKey>'
       (eval):2:in `block in action_create'
       /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-19.0.2/lib/chef/provider.rb:304:in `instance_eval'
       /opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-19.0.2/lib/chef/provider.rb:304:in `compile_and_converge_action'

Related Issue

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

[ ] I have read the CONTRIBUTING document.
[ ] I have run the pre-merge tests locally and they pass.
[ ] I have updated the documentation accordingly.
[ ] I have added tests to cover my changes.
[ ] If Gemfile.lock has changed, I have used --conservative to do it and included the full output in the Description above.
[ ] All new and existing tests passed.
[ ] All commits have been signed-off for the Developer Certificate of Origin.

I merged this into a PR #14555 that I'm working on to fix the pipeline tests. Also have freebsd working in pipeline tests as well.


new functionality?

I believe the functionality of your API is already provided by
https://github.com/RayYu03/pysoccer
.  I am wondering why your API is listed on the Python Package Index.  There is no documentation or usage in the README, so I don't see how this is useful to other programmers.

Actually this package was written before pysoccer and in addition to it I couldn't find much time writing the docs for the package and at that time there wasn't a good enough package to suit my needs for another open source project called https://github.com/SlapBot/stephanie-va which has a good documentation and you are more than welcome to check out.
I might return back and write the correct docs later on. Cheers.

Thanks for the info!


Add option to protect against csv formula injection attacks

Added the option to pass in formula_defense: true into the #add_row method.
In John Legrand's words, from this issue https://github.com/randym/axlsx/issues/624
"""
It would be nice to be able to pass an option to block formula injection. We use this Gem to let clients export tables to excel sheets. This is an unsafe practice because a formula could be injected. There should be an ability to block these injections to OWASP standards. (prepending "'" to anything that starts with something possibly malicious. https://www.owasp.org/index.php/CSV_Injection
"""

It would be nice to have this built-in to axlsx as we do currently have to do our own formula detection/escaping where I work.

Should I open this in https://github.com/caxlsx/caxlsx?

@randym Let me know if I should open it or not in caxlsx, I realized I didn't tag you in the above comment, so not sure if GitHub sent you the notification or not after editing your username into the original message. If they already did, sorry!

Please open this in caxlsx, I think it’s an important feature.
Not sure about the naming, though. Maybe rather something along the lines escape_formulas (similar to CGI.escape_html and friends)?
Also some documentation would be needed. But if you’re okay with opening that PR in caxlsx, let’s continue that discussion over there.

@noniq thank you, will do! I'll definitely address any code review comments so will rename and whatever else you all think is necessary!

@noniq added pull request here https://github.com/caxlsx/caxlsx/pull/34

This has been addressed in https://github.com/caxlsx/caxlsx/commit/0a223011a

@noniq woah it's been awhile, my bad. I'm probably ok to close this here, right?

I think so, yes. Thanks again for your contribution!


Installation instruction in documentation is out of date

In GitLab by @ksiero on Nov 25, 2020, 14:45
The version of dependencies are not coherent with actual requirements of libraries versions or required versions are missing:
https://pdi.julien-bigot.fr/master/Installation.html

In GitLab by @youldrouis on Mar 30, 2021, 13:16
especially change the line that says
cmake -DCMAKE_INSTALL_PREFIX=/usr/ ..       # configuration


fix: set fees to zero if not provided

This sets the base fee to zero in eth_call, and sets fees to zero if none are provided in the request.
The logic from geth that we should try to emulate for this is here:
https://github.com/ethereum/go-ethereum/blob/ee8e83fa5f6cb261dad2ed0a7bbcde4930c41e6c/internal/ethapi/transaction_args.go#L228-L257
Called here for geth's DoCall:
https://github.com/ethereum/go-ethereum/blob/ee8e83fa5f6cb261dad2ed0a7bbcde4930c41e6c/internal/ethapi/api.go#L981
Fixes #1907

Codecov Report

Merging #1997 (cec96f3) into main (050096d) will decrease coverage by 53.57%.
The diff coverage is 80.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@             Coverage Diff             @@
##             main    #1997       +/-   ##
===========================================
- Coverage   73.03%   19.47%   -53.57%
===========================================
  Files         426      427        +1
  Lines       52234    52254       +20
===========================================
- Hits        38151    10174    -27977
- Misses      14083    42080    +27997

Flag
Coverage Δ

integration-tests
19.47% <80.00%> (-0.01%)
:arrow_down:

unit-tests
?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

crates/rpc/rpc/src/eth/api/call.rs
53.13% <75.00%> (+0.32%)
:arrow_up:

crates/rpc/rpc/src/eth/revm_utils.rs
63.79% <100.00%> (-4.04%)
:arrow_down:

... and 288 files with indirect coverage changes
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Update log4j.properties

Issue #, if available:
Description of changes:
Should we try and mitigate for https://www.randori.com/blog/cve-2021-44228/ here or is this resolved elsewhere?
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Thanks for this!

Yikes, I put in a semicolon there, please could you get rid of that?  I think it might break the properties file.

Ok the build didn't fail - I'm surprised. I can try and manually test it at some point today (UTC).


fix: enable to persist and restore fifo queues

fix #697

thanks :)

thanks 😄

@micossow
Do you have plan when release this changes ?

I've just released that. Thanks for reminding me. :)


Question

The Honorable Author:
In the Mac version of Atom, this popped up when I tried to run a piece of code
SyntaxError: Non-ASCII character '\xe5' in file /Users/infinite/Desktop/python学习/time.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
But this code can run in Python's IDE
Why is this happening ?
Please tell me how to solve this question.
Thank you !

那可能是你的ide比较智能，但是按道理是需要显式声明的。见你的错误信息中提到的链接。

@foreshadow is right. Just follow the link and it'll tell you how to fix it. PEP-0263
Note on Windows the default system encoding is ISO-8859. Most modern systems are UTF compliant, although you're more likely to see UTF on a *nix system by default and ISO on a Windows system by default. Python by default will recognize the source file as ASCII.

但是当我在源代码的第一行添加了
# -*- coding: utf-8 -*-
还是显示出了同样的问题。
我在windows系统用的好好的，但刚换成Mac系统就不能用了，好难受⁄(⁄ ⁄ ⁄ω⁄ ⁄ ⁄)⁄


PushNotificationIOS

PushNotification.checkPermissions() does not work as it returns 'Cannot read property 'checkPermissions' of undefined'. Diving in further, require('NativeModules') does not have a PushNotificationManager which is referenced by PushNotificationIOS.js
Output of NativeModules:
Object {UIActivityIndicatorViewManager: Object, AppState: Object, LocationObserver: Object, TabBarItemManager: Object, NetworkImageViewManager: Object…}ActionSheetManager: ObjectAdSupport: ObjectAlertManager: ObjectAppState: ObjectAsyncLocalStorage: ObjectCameraRollManager: ObjectDataManager: ObjectDatePickerManager: ObjectExceptionsManager: ObjectLocationObserver: ObjectMapManager: ObjectNavItemManager: ObjectNavigatorManager: ObjectNetworkImageViewManager: ObjectPickerManager: ObjectRawTextManager: ObjectReachability: ObjectScrollViewManager: ObjectSliderManager: ObjectSourceCode: ObjectStaticImageManager: ObjectStatusBarManager: ObjectSwitchManager: ObjectTabBarItemManager: ObjectTabBarManager: ObjectTextFieldManager: ObjectTextManager: ObjectTiming: ObjectUIActivityIndicatorViewManager: ObjectUIManager: ObjectVibration: ObjectViewManager: ObjectWebViewManager: Object__proto__: Object
I've gone through the steps and enabled PushNotifications for the project.

Seems to work after manually adding the RCTPushNotificationManager.* files into xcode

Same issue here, dropping /Libraries/PushNotifcationIOS/RCTPushNotificationManager.* works.

Did you manage to get it working? I have everything up and running (Parse back-end to send push notifications) but 'PushNotificationIOS.addEventListener('notification', this._onNotification);' is never triggered.
I get the notification from iOS but not the event in the React native part. I've added a breakpoint in didReceiveRemoteNotification in RCTPushNotificationManager.m but it never halts.

@jonaswindey - did you figure that out? ping me if not and I'll reopen


Embedchain langchain gpt4all

Description
Embedchains GPT4All LLM will now use Langchain's GPT4All LLM instead of gpt4all LLM.
Fixes # (issue)
Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] Refactor (does not change functionality, e.g. code style improvements, linting)
[ ] Documentation update

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Please delete options that are not relevant.

[x] Test Script (please provide)

from embedchain.apps.app import App

app = App.from_config(yaml_path="configs/gpt4all.yaml")

question = "What is net worth of Elon Musk?"
response = app.query(question)
# Answer: As of 2021, Elon Musk's net worth is estimated to be around $174 billion USD according to Forbes.

app.add("https://en.wikipedia.org/wiki/Elon_Musk")
app.add("https://www.forbes.com/profile/elon-musk")
app.add("https://www.youtube.com/watch?v=RcYjXbSJBN8")

response = app.query(question)
# Answer: The net worth of Elon Musk can be found by looking at the latest available financial statements of Tesla, SpaceX, and/or Boring Company. As of October 21, 2023, based on Real Time Net Worth, his net worth is $225.2 billion USD.

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules
[x] I have checked my code and corrected any misspellings

Maintainer Checklist

[ ] closes #xxxx (Replace xxxx with the GitHub issue number)
[ ] Made sure Checks passed

Also, @deven298 please resolve the issue of why tests are failing for this PR.

@deven298 we probably want to add more tests for this. Can you please do that in a follow up PR?


[Feature] Automatic audit function

Motivation
Many times, our table structure will have fields like: created_at, updated_at, created_by, updated_by. These fields are usually generated automatically by the ORM framework.
For example:created_at is only generated during insert, updated_at is generated during insert or update.
Proposed Solutions
Although these functions can be implemented through the Entity's Hook (ActiveModelBehavior), it is redundant to write them for each entity, and it doesn't make sense. I hope the framework can have the functionality of global hooks, and at the same time, the framework can also provide several commonly used global hooks (such as AuditableHook). Users can also customize global hooks (for example, implementing automatic auditing for created_by and updated_by).
I think this will be a powerful feature, providing more hooks will be more convenient.
Another suggestion is that there is a lack of after_get/after_query hooks in ActiveModelBehavior. This hook can implement further processing of the queried Model(For example: unified data dictionary translation for some fileds in Model.).
Current Workarounds
Hardcoding, repetitive copying

Yes, I think after_get would be a low hanging fruit. We didn't add that initially, may be because I don't think there will be a need for it, and adding that would create confusion.
I think a concern is whether we can apply the same operation on partial and custom selects. What do you think about this?

There is such a scenario. Suppose we have a user table: user(id, name, account, status, created_at, updated_at). Here, the status column is a state column. Our design principle is to store values like 1 or 2 in the database, which represent enabled and disabled respectively. When we query the data from the user table through sea-orm and return it to the frontend UI for display, we need to translate the status field by translating 1 as enabled and 2 as disabled. This translation operation is just one example of similar cases. Moreover, this translation operation cannot be hard-coded into select because it is dynamic and stored in the database. During translation, it dynamically queries the database based on relevant identifiers to obtain translated content corresponding to 1 or 2. Therefore, this operation is suitable for hooks like after_query/after_get because it repeats almost everywhere globally.

There is such a scenario. Suppose we have a user table: user(id, name, account, status, created_at, updated_at). Here, the status column is a state column. Our design principle is to store values like 1 or 2 in the database, which represent enabled and disabled respectively. When we query the data from the user table through sea-orm and return it to the frontend UI for display, we need to translate the status field by translating 1 as enabled and 2 as disabled. This translation operation is just one example of similar cases. Moreover, this translation operation cannot be hard-coded into select because it is dynamic and stored in the database. During translation, it dynamically queries the database based on relevant identifiers to obtain translated content corresponding to 1 or 2. Therefore, this operation is suitable for hooks like after_query/after_get because it repeats almost everywhere globally.

Of course, the user's status is just a simple example. Perhaps you might think that it can be hard-coded because enabling and disabling are basically determined in the future. But what about the user's type? Suppose the user has a type field with values of 1 and 2, representing unauthenticated user and regular user respectively. What if a new type, 3, is added in the future to represent member user? It definitely won't work if we continue to hard-code it.

If we only focus on your use case, I'd think the "after select" operation can be per column, do you have a need for it to access all fields of the model in one scope?
I am thinking a definition of:
fn after_select(column: E::Column, value: Value) -> Value;

// or ?

fn after_select(&mut E::Model);

I think:
fn after_select(&mut E::Model);

would be better.
The reasons are as follows:
More customized modifications can be made to the model.
Scenario 1: The modification of a certain field depends on several other fields in the model.
Scenario 2:
Assuming model definition:
#[derive(
    Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize, DataDictionaryTranslate,
)]
#[sea_orm(table_name = "sys_user")]
#[serde(rename_all = "camelCase")]
pub struct Model {
    #[sea_orm(primary_key, auto_increment = false)]
    pub id: String,
    // ... other omitted fields
    #[translate(name = "user_status", field = "status_name")]
    pub status: SwitchStatus,
    #[sea_orm(ignore)]
    pub status_name: Option<String>,
}

For the field status_name, it does not exist in the database table itself. It is a virtual field only used to store the translation result of the field status.
If fn after_select(&mut E::Model); is used, similar pseudocode would be as follows:
fn after_select(model &mut E::Model) {
    // 1. Directly call the method derived from the custom `Derive` macro `DataDictionaryTranslate`.
    model.translate();

    // 2. Or manually translate
    model.status_name = translate_data_dictionary("user_status", model.status);
}

I was looking into the implementation strategy, but realized quite a bit of plumbing work needs to be done to carry the ActiveModelBehaviour type along the execution pipeline, until after FromQueryResult. Basically we'd want the function to be applied after M::from_query_result. We need the IntoActiveModel<A> there.

Thank you.
I am a Java programmer and only a beginner in Rust. I apologize that I cannot thoroughly understand the sea-orm source code in a short period of time, so I cannot provide some reasonable implementation strategy suggestions.

Okay, have another idea. If we allow ourselves to Box<dyn Fn(T)> it can make the task easier.


All the navbar elements are not visible at certain width

@VivekBaldha0712 Hi, Can I be assigned this issue?

cc @chalin

Looks like this is a duplicate -> https://github.com/cncf/tag-env-sustainability/issues/167


About rowKey design, MD5 or hash prefix

hi, we are using pinpoint. And found HBase data is not evenly distributed in region server, cause some application has high QPS, some have low QPS.
so, I think set the applicationName and agentId in rowKey to MD5 and use HexStringSplit as SPLITALGO is better?

Already we tested with different hash algorithms, but It has no effect.
We need validated data for patch.

We solve it. cuz we change the applicationName length and need to modify bucket config.


Remove mixup over node key-gen vs stake-pool key-gen

The former is the one true node operator key gen. Remove the latter.
Adjust the building of stake pool registration certs and delegation
certs to read the right format of key.

Duncan wants to modify this further.

I've changed my mind. We can leave these changes for the API revamp.

bors merge

bors merge


Update public documentation to new framework

I've set up the new framework and documentation in the test-mike branch, updated it with the old documentation as well as a correct versioning for the current EMMOntoPy/EMMO-python package and EMMO PyPI version.
In order to "publish" it, it should be force pushed to the gh-pages branch, which will automagically publish the new documentation style.
I've tested the workflow for updating and publishing new versions locally, it seems stable to keep the old documentation and more.
I will document this workflow both in the form of the CD as well as actual documentation.
@jesper-friis and @francescalb please let me know here whether you are okay to "publish" the new documentation framework.
You can test it out first by doing the following:
/path/to/EMMO-python$ git fetch origin && git checkout master
/path/to/EMMO-python$ git pull
/path/to/EMMO-python$ pip install -U -e .[docs]
/path/to/EMMO-python$ mike serve -r origin -b test-mike
Starting server at http://localhost:8000/
Press Ctrl+C to quit.

And then go to http://localhost:8000.

To dos:

[x] Fix landing page logos (issue: #233) (PR: #235)
[x] Fix EMMO acronym everywhere in the package (issue: #230) (PR: #238)
[x] Update test-mike branch with fixes.
[x] Force push test-mike to gh-pages, publishing the new documentation framework.

I think it is almost fine to publish it, after we have changed the EMMO-acronym and fixed the sized of the contributing project logos. I would like the first page to look more or less correct at least...

I think it is almost fine to publish it, after we have changed the EMMO-acronym and fixed the sized of the contributing project logos. I would like the first page to look more or less correct at least...

Good idea.
I've added these two points to the OP as "to do"s with references to their respective issues and PR(s).

The new documentation framework has now officially been put in place: https://emmo-repo.github.io/EMMO-python 🎉 🌟


have the application page listen to socket io events

update the ui when changes are pushed
fixes #41

Coverage remained the same at 98.611% when pulling 3acec49985c04cfeab5c6fbbf0e33acd525d40ed on fixes-#41 into e8252f6c81a93c1360bafcf8b3d1fe9eb12d5468 on master.


Package request: imaginary

Project description
Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing. Recommended by NextCloud Documentation for generating image previews.
Metadata

homepage URL: https://fly.io/docs/app-guides/run-a-global-image-service/
source URL: https://github.com/h2non/imaginary
license: mit
platforms: linux

already in nixpkgs
https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/imaginary/default.nix
also has a nixos module


Add OpenXR CTS test for API layer pre-create operations

OpenXR API Layers may need to query other layers or the runtime before the instance has been created - add an explicit test for this case.
This is an external mirror of https://gitlab.khronos.org/openxr/openxr/-/merge_requests/3415

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.John Kearney seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

@fredemmott I've copied the CTS test that I've been working on in the working group gitlab here in case you happen to have views on how it should be implemented.
I see your existing loader spec change: https://github.com/KhronosGroup/OpenXR-SDK-Source/pull/490 and OpenXR spec change: https://github.com/KhronosGroup/OpenXR-Docs/pull/173 which seem to be connected to this; and the recent bug in Meta PC v68 release.

Thanks; I’ll take a look through when I can. Those PRs are really the easy half of the problem: I see them as only clarifying behavior that is already required by various parts of the spec.
I think the behavior that the loader spec requires for xrEnumerateApiLayerProperties is incorrect, and needs to be similar to  instance extensions ; I just wanted to put up the less controversial PRs first

It would be useful to check xrEnumerateInstanceExtensionProperties both before and after creating an instance: if this layer is above other layers adding extensions (e.g. HTC, Ultraleap), the list may change.
Given the values can change at runtime according to the spec, there isn't a correct before-and-after set of values that applies generically, but it would be good to test it works.
It would be good to preemptively add a similar test for xrEnumerateApiLayerProperties - there have been several similar bugs in hardware vendor's API layers, but not - yet - in a runtime.
The spec issue for xrEnumerateApiLayerProperties is:

"xrEnumerateApiLayerProperties must: return only its own API layer properties."

Say you have game -> layer A -> layer B -> layer C -> runtime; by a strict reading:

layer A can see that layer B exists
layer B can see that layer C exists
layer A can not see that layer C exists, because B must 'only return its own API layer properties'

I believe that 3 is undesirable and surprising behavior; instead, layer A should be able to see both layer B and layer C. The spec should be changed (and I'm happy to create PRs) to be more similar to the xrEnumerateInstanceExtensionProperties - though, more specifically, layer B should be required to prepend its' own information:

unlike with extensions, order matters for layers
if it is prepended, while this would be a spec change adding more requirements, I do not believe there is a conformant way for a caller to depend on the old behavior: callers must allocate a buffer of the correct size, they must not assume it only has 0 or 1 entries.

A revised version of this PR has been merged internally.

That revised version is now released.


Support for GA102 Chips

I'm not quite sure where to ask this question so please excuse me if this is not the right place. I see that GA102 GPU Chips are not supported by vGPU and I was wondering if there were any future plans to compile support for these newer chips or not. Thank you for your awesome contributions to the vGPU community!

In the description at the top of the project description it states:

"Ampere support is currently a work in progress"

Since GA102 is an Ampere card, it is also in Progress. Somewhere in the details I read that Ampere cards work a little different and might require a new approach to make them work.


Null check operator used on a null value

Function _getCaretHeight in file code_field.dart causes a null exception. Reason is casting away nullability for caretFullHeight!.

This fix dosn't exist in the pub.dev code?


Evernote Clone

Description
I want to make Clone of Evernote Website in html,css and javascript
Code of Conduct

[X] I follow Contributing Guidelines of this project.

/assign


Run app for Mac OS X doesn't open in front with 0.11.2

As described in https://github.com/rogerwang/node-webkit/wiki/How-to-run-apps#mac-os-x I use an alias to start my app while devloping: alias nw="/Applications/node-webkit.app/Contents/MacOS/node-webkit". I updated node-webkit yesterday to 0.11.2. If I call $ nw ./app now it opens a window in the background. Before that it opened in the front.

For me it still doesn't open in front. I use node ./node_modules/.bin/nwbuild -r dist/ now to open my app and version v0.11.5.


Scrolling too fast with scroll bar results in console error

I started using this package a couple days ago, and it's pretty nice! However, I've encountered one issue.
When I scroll normally by swiping my figure up and down, everything works fine. And when I scroll by holding down on the scroll bar and moving my figure up and down, this also works fine as long as I scroll slowly.
However, if I hold on the scroll bar and move my figure up and down quickly, it results in many error messages in the console of the form Bound preference PositionPreferenceKey tried to update multiple times per frame.
Based on this SO answer, the error message is probably due to how the GeometryReader and PositionPreferenceKey interact with each other. But I'm not sure exactly how to fix it.

I can't repro this on my phone/Xcode (can't see the warnings no matter what I do). If you wrap the onPreferenceChange body (starts at line 131) into a DispatchQueue.main.async { }, do the warnings go away?

Thanks so much for looking into this @gordan-glavas-codecons. Unfortunately the DispatchQueue.main.async { } tip didn't help.
It took me awhile, but I did finally manage to create some sample code to help you reproduce the error. Here it is:
import SwiftUI

@main
struct RefreshableScrollViewApp: App {
  var body: some Scene {
    WindowGroup {
      TestingView()
    }
  }
}

struct TestingView: View {
  var body: some View {
    RefreshableScrollView(
      onRefresh: { done in DispatchQueue.main.asyncAfter(deadline: .now() + 3) { done() } },
      content: {
        LazyVStack {
          ForEach(0..<80) { _ in
            Menu {
              Button("Delete", role: .destructive) {}
            } label: {
              Text(Image(systemName: "ellipsis"))
            }
          }
        }
      }
    )
  }
}

To trigger the error, refresh the scroll view, and then rapidly drag the scroll bar in long strokes up and down. You should see a bunch of instances of Bound preference PositionPreferenceKey tried to update multiple times per frame appear in the console as you scroll.

I too have this problem, but haven't found a solution yet...


support fedora versions 28 and later

I updated the spec tests, and have these changes active on a live Fedora 30 Server system.

Sorry for not addressing this earlier. Would you mind rebasing this PR?

I tried to quickly deal with it when I first received you message, but "Fedora" being a RedHat family member with many more versions than rhel, coupled with fact I am now working on Archlinux support too, I believe a much better approach would be to leverage hieradata combined with the service_provider fact. That should make the logic much simpler.
If you disagree, please advise, and will accept your direction.
Sent from Mailspring (https://link.getmailspring.com/link/384AEF79-A4A8-4D29-A872-D9B15978D5A0@getmailspring.com/0?redirect=https%3A%2F%2Fgetmailspring.com%2F&recipient=cmVwbHkrQUM2NllCTUNOSTM3TVpWVlZIU0dFSTUzTVBXSzdFVkJOSEhCVk9ZQ1k0QHJlcGx5LmdpdGh1Yi5jb20%3D), the best free email app for work
On Aug 16 2019, at 10:14 am, Raphaël Pinson<EMAIL_ADDRESS>wrote:

Sorry for not addressing this earlier. Would you mind rebasing this PR?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub (https://link.getmailspring.com/link/384AEF79-A4A8-4D29-A872-D9B15978D5A0@getmailspring.com/1?redirect=https%3A%2F%2Fgithub.com%2Fcamptocamp%2Fpuppet-postfix%2Fpull%2F247%3Femail_source%3Dnotifications%26email_token%3DAC66YBOT6QAUGOMDNZHZPLDQE2Y27A5CNFSM4HPUSWVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4OXHTA%23issuecomment-522023884&recipient=cmVwbHkrQUM2NllCTUNOSTM3TVpWVlZIU0dFSTUzTVBXSzdFVkJOSEhCVk9ZQ1k0QHJlcGx5LmdpdGh1Yi5jb20%3D), or mute the thread (https://link.getmailspring.com/link/384AEF79-A4A8-4D29-A872-D9B15978D5A0@getmailspring.com/2?redirect=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAC66YBPZ6TDKYQF46AJA3XLQE2Y27ANCNFSM4HPUSWVA&recipient=cmVwbHkrQUM2NllCTUNOSTM3TVpWVlZIU0dFSTUzTVBXSzdFVkJOSEhCVk9ZQ1k0QHJlcGx5LmdpdGh1Yi5jb20%3D).

I decided to rebase my changes. All spec tests passed after rebasing.

It's true that hiera data would probably simply this logic. I'd welcome a patch in this direction if you want to take it.

I am closing this PR as I have finally had time to simplify the logic by leveraging hieradata. I will submit the new PR momentarily.


Question

Hello,
I would be happy if there is more to "individuallize". Am unfortunately not powerful this programming language that I could rework myself.
If I have time, I would like to change the date to dd.MM.YYYY. Where would I find that the?
Thanks a lot

Hi,
Sorry for the long delay. I believe the date format you are referencing is here:
https://github.com/mogensen/cert-checker/blob/main/pkg/web/html.go#L33
I would like to make the entire web interface of cert-checker more customizable when I find the time. But for now the only real option is for you to recompile the project your self.
/ Best of luck

I have marked the date I want to change in the attached screenshot. So far I haven't found anything in the code that I can build myself.
The "late answer" doesn't matter :) There is no hurry
Would like to format it like this -> DD.MM.YYYY
I don't have much experience with Go yet :)


Gene list creation workflow from workbook

From my workflow, I tried select Genes and didn't have any lists created, so I clicks "+ Apply New Gene List"
That took me to this page:

But if I hit cancel, it takes me here:

Where I would have expected it to take me back to my workbook, or at least still see it in the breadcrumbs.
It also wouldn't let me Apply TP53 to my workbook.

Yep the cancel is routing to the wrong url in genes


Bounds object undefined

Within the tray clicked event, the bounds object provided is undefined. This is on OSX 10.10.3. May need to check for existence around line 38 of index.js and create it if necessary.

Resolved in electron-0.25.3, errors produced in 0.25.1


Naming constraints in SAT

Hi,
I recall the Linear Solver v7.2.6977 offered the ability to name the constraints with a unique string through the Solver.MakeConstraint() method. It was particularly useful for debugging especially when using the Solver.ExportModelAsLpFormat(false) method to visualize the model and ensure the proper expressions were in fact implemented.
I am now working with the SAT solver v7.2.6977 (original model was created on that version) and I can't find a way to label my constraints. Is there a way to do so in SAT v7.4? Also is there a way to print out the model to a text file once built?
Thank you

Yes, it is a bit manual.
You need to get the underlying protobuf object of the constraint. It supports the 'name' field.
See https://github.com/google/or-tools/blob/stable/ortools/sat/doc/model.md for some preliminary documentation.


Broken Link/Missing Spell Effect: Nudge Fate

One of my Players created a Witch and noticed that the Spell Nudge Fate has a Broken or Missing Link for the Spell Effect. I testet it in my local foundry without any modules and there was no Spell Effect either. Its nowhere in any Compedium Folder, so i guess it got lost or was never created?

Closing as module issue

Ok, didnt connect it to a modul. Thanks anyway :)

@Vendergast This will specifically be a localization module with an out-of-date spell description.


Feature extended server information

Notes on additional changes, resulting from issues I stumbled upon when working on this PR:

Replaced BOOL by bool for fields that are definitely booleans and not integers.
The PROTECT command is not toggling anymore but always protects. UNPROTECT always unprotects.
Robustness: Moved sanity checks from rasctl to rascsi, so that these checks are run for any client and cannot be circumvented.
rascsi does not mention "rasctl" in its error messages anymore, because there may be other clients
Open() now returns an error string, so that error messages can be more concise

I couldn't get this to compile.
The first change needed is to add #include <sys/mman.h> to the top of gpiobus.cpp (since you removed it from os.h.... it really should have been in gpiobus.cpp to begin with).
Then, on line 229 of rasctl.cpp, 'type' needs to be initialized to something.

@akuker I tested the compilation on my Pi by copying the files to the Pi from my main development machine. But I must have missed something (probably copied the files to the wrong location), because with the checked out sources I also have issues.
I'm sorry for that, I'm going to fix this now.

@akuker Regarding linke 229, no initialization is required. It's a documented feature of protobuf that enums are initialized by default with the first enum value
I just aded the missing include, and now everything compiles on my Pi.

@akuker I did a lot of drive attribute testing (removable, read-only etc.). As a subject for discussion we should decide whether hard disk drives should be write-protectable in general. With the code of this PR this is the case. Reasons why they should be:

This is convenient for the user. One can protect hard disk images that should not be modified without dealing with file permissions.
There are non-MO drives that can be write protected, like ZIP or JAZ. Usually a proprietary SCSI command is used for that, but there is not much software that knows how to use these proprietary commands. So instead of emulating a ZIP or JAZ device just to have non-MO drives with write protection, having the means to protect a hard disk in general is a more flexible approach.

@akuker Can you please tell me which compiler version caused the compile-time error? As already mentioned I don't get any compiler error on my Pi.

@akuker I did a lot of drive attribute testing (removable, read-only etc.). As a subject for discussion we should decide whether hard disk drives should be write-protectable in general. With the code of this PR this is the case. Reasons why they should be:

No objections from me. I can definitely understand the use case where you want to make a HD read-only.
Note: I still got the compiler error about type being uninitialized in rasctl, so I just added the initialization of it.


Click on trends link is not displaying in single line

Student Attendance(Attendance)
Click on trends link is not displaying in single line

Retested not fixed

working as expected


android: overwrite ndef mime tag

I'm trying to write different kinds of tags, empty tag, ndef with knowed mimetype tags and ndef unknowed mimetype tag.
I was trying to do listening to nfc.addTagDiscoveredListener but the problem is that when i try to overwrite ndef mimetype tags i see in the logcat console that ndef-mime event is fired. In the second attemp tag listener is triggered ok.
i'm doing something wrong?

@lasterra nfc.addTagDiscoveredListener should handle all the tags allowing you to overwrite with your content. If you define additional listeners (e.g. ndef or mime-type) Android will call the most specific listener for your tag instead of the tag discovered. If you only have the nfc.addTagDiscoveredListener defined in your code it will catch the tags.
There is one exception. If you use an an intent filter to launch your app when a tag is scanned your application will receive a mime-type event.
What version of Android is on your phone? What hardware are you running?


Pull react-server-webpack-plugin files source into separate templates

Description
This PR pulls the inline template strings used to write the "virtual" files out into templates that are parsed and transformed via babel. This allows those files to be a little more manageable and syntax-highlighted.
Fixes https://github.com/Shopify/quilt/issues/945
This PR requires the @shopify/ast-utilities package added here https://github.com/Shopify/quilt/pull/949

@TheMallen can I get another look at one?

@TheMallen oh totally, I'll explore, but gonna merge this for now.


Added an is_empty operation to instances and a cache for the dask_sql fetch one

Hey @jonasrenault let me know if you think that this strategy can help


feat(vhost): allow to expose security domain using virtual hosts

Closes gravitee-io/issues#3199
Closes gravitee-io/issues#3507

👍


remove listener on errors during startflip

If it stays, it can deadlock NotifyRouter.
cc @maxtaco

tested locally


Make iPhone 6 - CSS only

Please create a demo folder inside "iPhone-6" and add a working demo of your project named demo.gif

Done


Newly added element cannot be found using ID attribute

Hi,
I'm using v<IP_ADDRESS> and I think I've found a bug.
As part of my processing I need to add an html element and then later on find that element using it's ID attribute. However, although the element adds ok and I can extract the document as a string (OuterHTML property) and see it there, using the GetElementbyId method does not find it.
However I have found a workaround as follows:

that after adding the element
extract the OuterHTML property into a string variable
set my document variable to Nothing
initialise my document variable as a new HTMLDocument
load the string into my new document

At this point I can now find the recently added element using GetElementbyId.
If I'm correct then it looks like the InsertAfter method (which is the one that I'm using) does not rebuild whichever internal structure the GetElementbyId method uses.
(or of course I'm doing it wrong!)
In my case this is not a major issue, the above work-around is acceptable for my processing.
Cheers,
Dave

Hello @DaveWellman ,
Do you think you could reproduce the full issue in a code sample?
That will be easier/faster for me to investigate it.
Best Regards,
Jonathan

Hi Jonathan,
Thanks for the speedy response.
As is often the case, when you start producing a simple example you work out what is going wrong. I think this is my mistake and I don’t think there is anything the HtmlAgilityPack code can do about it.
What I’m doing is adding a complete table row which has multiple ‘td’ elements in it. The id attribute that I’m looking for (and couldn’t find) is in one of those ‘td’ elements, but of course the HtmlAgilityPack code doesn’t see that as it is ‘buried’ in a string.
Here are a couple of examples from my test project.

 Add a simple html element which has an id attribute. This can be found..

 Add a more complex html string (in my case a complete row in a table) where the ‘tr’ element has an id attribute. This can be found.

 Add a more complex html string (in my case a complete row in a table) where one of the ‘td’ elements has an id attribute. This can NOT be found.

At the end of this email is my test project, a simple vb.net console program.
If you look for the two ‘NOTE’ comments, they describe the situation.
If you can handle this that would be great, but if not then I’ll sort it in my code.
Cheers,
Dave
Imports HAP = HtmlAgilityPack
Module Module1
Sub Main()

    Dim lHTMLDoc As HAP.HtmlDocument

    Dim lELM As HAP.HtmlNode

    Dim lNewELM As HAP.HtmlNode

    Dim lStr As String

    Try

        Console.WriteLine("Starting")

        lHTMLDoc = New HAP.HtmlDocument

        lStr = "<!DOCTYPE html>"

        lStr = lStr & ""

        lStr = lStr & "<title>Users Configuration</title>"

        lStr = lStr & ""

        lStr = lStr & ""

        lStr = lStr & "
 This Is some text for id=id1
"

        lStr = lStr & "
 This Is some text for id=id2
"

        lStr = lStr & "
 This Is some text for id=id3
"

        lStr = lStr & "
"

        lStr = lStr & "
"

        lStr = lStr & " 	"

        lStr = lStr & "Admin	"

        lStr = lStr & "Write	"

        lStr = lStr & "Read	"

        lStr = lStr & "None	"

        lStr = lStr & "Delete	"

        lStr = lStr & "
"

        lStr = lStr & "
"

        lStr = lStr & ""

        lStr = lStr & ""

        lHTMLDoc.LoadHtml(lStr)

        lELM = lHTMLDoc.GetElementbyId("id1") ' show that we can get an element based on it's id attribute

        Console.WriteLine("id1 retrieved: " & lELM.InnerText)

        lStr = "
 This Is some text for id=id4
"

        lNewELM = HAP.HtmlNode.CreateNode(lStr) ' create the node

        lELM.AppendChild(lNewELM) ' add the new element

        lELM = Nothing

        lNewELM = Nothing

        lELM = lHTMLDoc.GetElementbyId("id4") ' show that we can get an element based on it's id attribute

        If (Not lELM Is Nothing) Then

            Console.WriteLine("id4 retrieved: " & lELM.InnerText)

        Else

            Console.WriteLine("id4 NOT found!")

            Console.WriteLine(lHTMLDoc.DocumentNode.OuterHtml())

        End If

        ' NOTE: one of the 'td' cells in the following conains an id attribute value (cell4).

        lStr = "
"

        lStr = lStr & "David	"

        lStr = lStr & "21	"

        lStr = lStr & "22	"

        lStr = lStr & "23	"

        lStr = lStr & "24	"

        lStr = lStr & "
"

        lNewELM = HAP.HtmlNode.CreateNode(lStr) ' create the node

        lELM = lHTMLDoc.GetElementbyId("tbl1") ' this finds our 'table'

        If (Not lELM Is Nothing) Then

            Console.WriteLine("tbl1 retrieved: " & lELM.InnerHtml)

        Else

            Console.WriteLine("tbl1 NOT found!")

            Console.WriteLine(lHTMLDoc.DocumentNode.OuterHtml())

        End If

        lELM.AppendChild(lNewELM) ' add the new element

        lELM = Nothing

        lNewELM = Nothing

        lELM = lHTMLDoc.GetElementbyId("tr2") ' show that we can get an element based on it's id attribute

        If (Not lELM Is Nothing) Then

            Console.WriteLine("tr2 retrieved: " & lELM.InnerHtml)

        Else

            Console.WriteLine("tr2 NOT found!")

            Console.WriteLine(lHTMLDoc.DocumentNode.OuterHtml())

        End If

        ' NOTE: it is this bit which 'fails'

        lELM = lHTMLDoc.GetElementbyId("cell4") ' show that we can get an element based on it's id attribute

        If (Not lELM Is Nothing) Then

            Console.WriteLine("cell4 retrieved: " & lELM.InnerHtml)

        Else

            Console.WriteLine("cell4 NOT found!")

            Console.WriteLine(lHTMLDoc.DocumentNode.OuterHtml())

        End If

    Catch ex As Exception

        Console.WriteLine(ex.ToString)

    Finally

        ' Clean up

        lELM = Nothing ' clear this reference

        lNewELM = Nothing ' clear this reference

        lHTMLDoc = Nothing ' clear this reference

    End Try

End Sub

End Module
Ward Analytics Ltd - information in motion
Tel: +44 (0)<PHONE_NUMBER>
Fax: +44 (0)<PHONE_NUMBER>
www: http://www.ward-analytics.com
Registered office address: The Oriel, Sydenham Road, Guildford, Surrey, United Kingdom, GU1 3SR
Registered company number: 3917021 Registered in England and Wales.
From: Jonathan Magnan<EMAIL_ADDRESS>Sent: 16 November 2017 18:35
To: zzzprojects/html-agility-pack
Cc: DaveWellman; Mention
Subject: Re: [zzzprojects/html-agility-pack] Newly added element cannot be found using ID attribute (#105)
Hello @DaveWellman https://github.com/davewellman  ,
Do you think you could reproduce the full issue in a code sample?
That will be easier/faster for me to investigate it.
Best Regards,
Jonathan
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/zzzprojects/html-agility-pack/issues/105#issuecomment-345016227 , or mute the thread https://github.com/notifications/unsubscribe-auth/ALkDiafWpiX5-5xLTUw4rYpcmCkADc27ks5s3IBbgaJpZM4Qg6cS .Image removed by sender.

Thank you @DaveWellman,
I will try to check it during the weekend.
Best Regards,
Jonathan

Help us to keep this library free: Donate

Hello @DaveWellman ,
Sorry for the long delay,
The v1.6.10 has been released. We have improved the way we handle newly ID.
Let me know if that's fixed if you have time to check it.
Best Regards,
Jonathan

_Help us to support this library: [Donate

Hi Jonathan,
No problem with the delay, as I said in my original post I had an acceptable work around.
I’ve installed this version and it fixes the problem that I reported.
Many thanks,
Dave
Ward Analytics Ltd - information in motion
Tel: +44 (0)<PHONE_NUMBER>
Fax: +44 (0)<PHONE_NUMBER>
www: http://www.ward-analytics.com
Registered office address: The Oriel, Sydenham Road, Guildford, Surrey, United Kingdom, GU1 3SR
Registered company number: 3917021 Registered in England and Wales.
From: Jonathan Magnan<EMAIL_ADDRESS>Sent: 22 December 2017 22:09
To: zzzprojects/html-agility-pack
Cc: DaveWellman; Mention
Subject: Re: [zzzprojects/html-agility-pack] Newly added element cannot be found using ID attribute (#105)
Hello @DaveWellman https://github.com/davewellman  ,
Sorry for the long delay,
The v1.6.10 has been released. We have improved the way we handle newly ID.
Let me know if that's fixed if you have time to check it.
Best Regards,
Jonathan

_Help us to support this library: [Donate
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/zzzprojects/html-agility-pack/issues/105#issuecomment-353682349 , or mute the thread https://github.com/notifications/unsubscribe-auth/ALkDicro6YuAXPK0cKOw2vHYWESs2I51ks5tDChrgaJpZM4Qg6cS .Image removed by sender.


Add the protocol to the URLs in Google jmxtrans JSON configs.

This LGTM from the google-cloud-monitoring side. However, the configs on the stackdriver side should also be updated to include this fix.

Done. Will squash into one commit before the merge. PTAL.

LGTM, thanks for the patch.

Squashed, ready to merge.


exporterAllDataPromise doesn't accept a promise

It seems that this option is expecting a function which returns a promise. It should either be renamed to something link "exportAllDataFn", or be changed actually accept a promise object.

Yeah, it came in a pull request, it originally had some funny flags and polling going on so I asked for it to be changed to a promise.  The guy who did it wasn't 100% good with promises.  Renaming to exporterAllDataFunction and deprecating the old name (but allowing it to still be used).


bump deps, add missing uglify-js and modify browserify grunt task

to work with the newer version.

crap. I didn't notice that it updated testers too.  I didn't notice that it updated testers too. I will fix

after fiddling with it a bit, if I run the tests manually node --allow-natives-syntax ../mocharun.js mocha/when_spread.js for example, it says all good, but not in the runner.. not sure what is going on. just close the request or whatever.. lolz shit always happens on upgrades. I didn't notice cause the lib works fine... awesome lib. very through. cheers

after fiddling with it a bit, if I run the tests manually node --allow-natives-syntax ../mocharun.js mocha/when_spread.js for example, it says all good, but not in the runner.. not sure what is going on. just close the request or whatever.. lolz shit always happens on upgrades. I didn't notice cause the lib works fine... awesome lib. very through. cheers

I am in the process of completely redoing the build system at the moment

I am in the process of completely redoing the build system at the moment


How to generate genesis block for the test net?

Is there a special flag or option I need to include when generating a genesis block for the testnet?
I am receiving invalid errors at compile time, any help would be really appreciated guys :)
Thanks

The generation algorithms for the numbers for main or testnet are exactly the same.

Nice, Thanks!

how about regression test generation. ?


Custom view and rotation

Hello,
I've run into some trouble using a custom overlay like explained here in Xamarin.Forms
Showing the scan view initially with the overlay works great, but once you rotate the device the scanview does not rotate with the rest of the page in iOS.
In Android the image gets distorted and flipped around.
For iOS you can see the 2 screenshots:

Setting AutoRotate in the Options to true or false does not seem to change anything.
I've tried to 'reset' the view in
protected override void OnSizeAllocated(double width, double height) ...

But even in there I do not seem to be able to make changes to the view.
Any chance someone could point me out what I am missing here ? Would be greatly appreciated.

This was actually fixed in 2.1.12 release :)


Added sample data, and finished the views, updated the templates, and…

… added sample data
bug fix

👍


Using "interations: Infinity" in an AnimationSequence breaks everything

See:
http://jsbin.com/siyehu/2/edit
interations: Infinity
causes some error in setting up the animation, such that nothing ends up animating at all.
Replacing Infinity with 1000000 works fine.

This should be fixed when https://github.com/web-animations/web-animations-next/pull/319 lands.


Http Network Send Event Loop

just the stacked diff part of https://github.com/private-attribution/ipa/pull/221
The http implementation of the Network trait needs a simple event loop that takes data from the infra layer and sends it to the appropriate helper. This PR adds that functionality to initialization of the HttpNetwork

closed because the base branch has been merged


Issue when playing certain videos

The Issue
Steps to reproduce

Play a video. I was able to reproduce the issue while playing the following videos:
https://odysee.com/@Odysee:8/Julian:9
https://odysee.com/@Odysee:8/Odysee-Android-App:1

Expected behaviour
The video should continue playing until it's finished or is interrupted
Actual behaviour
The application closes but the audio can still be heard in the background
System Configuration

Device: Samsung Galaxy Note 10+
Android version: Android 11

Anything Else

Screenshots

Internal Use
Acceptance Criteria

Definition of Done

[ ]  Tested against acceptance criteria
[ ] Tested against the assumptions of the user story
[ ] The project builds without errors
[ ] Unit tests are written and passing
[ ] Tests on devices/browsers listed in the issue have passed
[ ] QA performed & issues resolved
[ ] Refactoring completed
[ ] Any configuration or build changes documented
[ ] Documentation updated
[ ] Peer Code Review performed

Thank you for the report!

Thank you for the report!

You're welcome.

I suppose I can close this issue as it has been fixed and merged in this pull request https://github.com/OdyseeTeam/odysee-android/pull/178


Missing syntax for context manager expressions

Summary
New syntax from 3.10 with (... as x, ... as y): of context managers is not supported. Checkout https://github.com/mtshiba/pylyzer/issues/30.
Expected
Add it :c
Actual

Python Documentation
Issue: https://bugs.python.org/issue12782
Release notes: https://www.python.org/downloads/release/python-3100/

@charliermarsh are you also seeing this in Ruff?

RustPython supports this, I just tested via Ruff. Is Pylzer on an old version?

All good, glad it's resolved :)


raft: fix deadlock in processInternalRaftRequest

It's possible that the wait item is canceled and not triggered so that the result channel might be empty.
ping @aaronlehmann

Current coverage is 54.48% (diff: 36.36%)

Merging #1847 into master will decrease coverage by <.01%

@@             master      #1847   diff @@
==========================================
  Files           102        102
  Lines         17043      17048     +5
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits           9286       9288     +2
- Misses         6616       6619     +3
  Partials       1141       1141

Powered by Codecov. Last update cf6c21e...5177bdd

LGTM


Memory leak on Linux

What is the output of running npx envinfo --binaries --languages --system --utilities?
System:
OS: Linux 4.15 Ubuntu 18.04.2 LTS (Bionic Beaver)
CPU: (1) x64 Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz
Memory: 470.87 MB / 983.91 MB
Container: Yes
Shell: 4.4.20 - /bin/bash
Binaries:
Node: 12.6.0 - /usr/bin/node
Yarn: 1.15.2 - /usr/bin/yarn
npm: 6.9.0 - /usr/bin/npm
Utilities:
Git: 2.17.1 - /usr/bin/git
Languages:
Bash: 4.4.20 - /bin/bash
Perl: 5.26.1 - /usr/bin/perl
Python: 2.7.15+ - /usr/bin/python
Instance Infomation
AWS t2.micro (1vCPU, 1GB Ram)
Ubuntu 18.04 LTS Linux
What are the steps to reproduce?
All of the following code do memory leak
Using Stream
await (new Promise(async (resolve, reject) => {
    try {
        let sharp = require('sharp');
        let maxPx = 2500;
        let rs = fs.createReadStream(oldPath);
        let ws = fs.createWriteStream(newPath);
        let transformer = sharp()
            .resize(maxPx, maxPx, { fit: sharp.fit.inside, withoutEnlargement: true })
            .rotate()
            .jpeg({ quality: 75 });
        ws.on('finish', () => { sharp = null; rs = null; ws = null; resolve(true); });
        ws.on('error', reject);
        rs.pipe(transformer).pipe(ws);
    } catch (error) { reject(error); }
}));
await Promise.all([
    (async () => {
        let sharp = require('sharp');
        let info = await sharp(newPath).metadata();
        fileW = info.width;
        fileH = info.height;
    })(),
    (async () => {
        let stat = await xfs.stat(newPath);
        fileSize = stat.size;
    })()
]);

Using Buffer to Buffer
let maxPx = 2500;
let buff = await xfs.readFile(oldPath);
let { data, info } = await sharp(buff)
    .resize(maxPx, maxPx, { fit: sharp.fit.inside, withoutEnlargement: true })
    .rotate()
    .jpeg({ quality: 75 })
    .toBuffer({ resolveWithObject: true });
await xfs.writeFile(newPath, data);
fileSize = info.size;
fileW = info.width;
fileH = info.height;

Using File to Buffer
let maxPx = 2500;
let { data, info } = await sharp(oldPath)
    .resize(maxPx, maxPx, { fit: sharp.fit.inside, withoutEnlargement: true })
    .rotate()
    .jpeg({ quality: 75 })
    .toBuffer({ resolveWithObject: true });
await xfs.writeFile(newPath, data);
fileSize = info.size;
fileW = info.width;
fileH = info.height;
data = null; info = null;

Using File to File
let maxPx = 2500;
await sharp(oldPath)
    .resize(maxPx, maxPx, { fit: sharp.fit.inside, withoutEnlargement: true })
    .rotate()
    .jpeg({ quality: 75 })
    .toFile(newPath);
let info = await sharp(newPath).metadata();
let stat = await xfs.stat(newPath);
fileSize = stat.size;
fileW = info.width;
fileH = info.height;

###About the issue
The larger the uploaded file, the more serious the memory leak.
When i upload 20 images and 5mb for each images,
memory usage come to 400MB-500MB.
When I do process.memoryUsage(),
RSS about 350-450MB and not effect to global.gc(); or sharp.cache(false);.
This issue happen on Node.js version 8,10,11,12.
I tried on each Node.js version, but the issue still here.
I tried global.gc(); and sharp.cache(false); and sharp.concurrency(1);,
also tried LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1,
but the issue still here.
This issue will be more important when server not restart for long time.
I tried all above of the codes and no issue on Windows and MacOS.
The memory usage keep increase after time and after upload images on Linux.
I tried switch to gm.js and no memory leak issue,
but gm.js is too slower then sharp.js.
Please help me to resolve this issue.
Thank you.
Here are full code
const xSQL = require('../lib/xSQL');
const xIMG = require('../lib/xIMG');
const xS3 = require('../lib/xS3');
const xCm = require('../lib/xCm');
const formidable = require('formidable');
const extend = require('extend');
const util = require('util');
const fs = require('fs');
const xfs = require('async-file');
const sharp = require('sharp');
const gm = require('gm');
const path = require('path');
// sharp.concurrency(1);
// sharp.cache(false);
// sharp.cache({ files: 2 });
// sharp.simd(false);

var fileIndex = Date.now();

async function xForm(req, res, next) {
    if ( /^application\/json/.test(req.headers['content-type'])) { next(); return true; }

    let result = { file: {} };

    if (!(await xfs.exists(__base + 'upload'))) await xfs.mkdir(__base + 'upload');
    if (!(await xfs.exists(__base + 'upload/temp'))) await xfs.mkdir(__base + 'upload/temp');

    let post = {};
    let form = new formidable.IncomingForm();
    form.encoding = 'utf-8';
    form.uploadDir = 'upload';
    form.keepExtensions = true;
    form.maxFields = 0;
    form.maxFieldsSize = 50 * 1024 * 1024;

    form.on('field', function (field, value) {
        if (form.type == 'multipart') {
            if (field in post) {
                if (util.isArray(post[field]) === false)
                    post[field] = [post[field]];
                post[field].push(value);
                return true;
            }
        }
        post[field] = value;
    });
    form.on('file', async function (name, file) {
        try {
            if (file.size == 0) { await xfs.unlink(__base + file.path); return true; }
        } catch (err) { console.error('xForm ERROR! => ', err); }
    });
    form.parse(req, async function (err, fields, files) {
        if (err) { console.error('xForm ERROR! => ', err); }
        if (files) {
            for (let name in files) {
                let file = files[name];
                if (file.size == 0) continue;
                // 解析正確的副檔名
                let extName = '';
                switch (file.type) {
                    case 'image/pjpeg':
                    case 'image/jpeg':
                        extName = 'jpg';
                        break;
                    case 'image/png':
                    case 'image/x-png':
                        extName = 'jpg';
                        break;
                    case 'application/pdf':
                        extName = 'pdf';
                        break;
                }
                // 定義新的隨機檔案名稱
                fileIndex++;
                let hash = xCm.md5(fileIndex.toString());
                let fileName = `${hash}.${extName}`;
                let oldPath = path.resolve(file.path);
                let newPath = path.resolve(`./upload/${fileName}`);
                let fileSize = 0;
                let fileW = 0;
                let fileH = 0;
                // 檔案檢查
                if (extName.length == 0) { await ErrorHandle('只支持 pdf 、 png 和 jpg 格式'); continue; }
                if (file.size > (50 * 1024 * 1024)) { await ErrorHandle('只支持少於 50 MB 的圖片檔案'); continue; }

                if (extName == 'pdf') {
                    try {
                        await xfs.rename(oldPath, newPath);

                        let SQL = new xSQL(); let r = null;
                        r = await SQL.xAdd('attinfo', { 'name': file.name, 'dir': fileName, 'type': 0, size: file.size });
                        if (r.err) { console.log(r.err); throw r.err; }
                        do { r = await SQL.xRead('attinfo', 'dir', fileName); }
                        while (r.eof);
                        result.files[name] = r.row[0];

                    } catch (error) { await ErrorHandle(error); continue; }
                } else {
                    let maxPx = 2500;
                    let buff = await xfs.readFile(oldPath);
                    let { data, info } = await sharp(buff)
                        .resize(maxPx, maxPx, { fit: sharp.fit.inside, withoutEnlargement: true })
                        .rotate()
                        .jpeg({ quality: 75 })
                        .toBuffer({ resolveWithObject: true });
                    await xfs.writeFile(newPath, data);
                    fileSize = info.size;
                    fileW = info.width;
                    fileH = info.height;
                    data = null; info = null;
                    buff.length = 0;
                    buff = null;
                }

                let s3 = new xS3();
                try { await s3.Upload(fileName, newPath); }
                catch (error) { await ErrorHandle(error); continue; }
                finally { s3 = null; }

                try { await xfs.unlink(oldPath); }
                catch (error) { console.log(error); }

                let SQL = new xSQL();
                let r = await SQL.xAdd('attinfo', {
                    name: file.name,
                    dir: fileName,
                    type: 0,
                    w: fileW,
                    h: fileH,
                    size: fileSize
                });
                if (r.err) { await ErrorHandle(r.err); continue; }
                result.file = {
                    err: false,
                    errMsg: '',
                    name: file.name,
                    num: r.insertId,
                    dir: fileName
                };

                async function ErrorHandle(err) {
                    try { await xfs.unlink(oldPath); }
                    catch (error) { console.error('xForm ERROR! => ', error, err); }
                    finally {
                        console.error('xForm ERROR! => ', err);
                        result.file.err = true;
                        result.file.errMsg = err;
                    }
                }
            }
        }
        Complete();
    });

    function Complete() {
        req.body = post;
        req.file = result.file;
        next();
    }

}

module.exports = xForm;

Hi, did you see and read all of the comments on #955?

I read all about 20-30 times, i tried everything, but the issue still here

Easy to reach 500mb by uploading 16 images and each 6MB

pm2 config
module.exports = {
    apps: [{
        name          : 'novel',
        script        : './app.js',
        watch         : false,
        //node_args     : '--max_semi_space_size=2 --max_old_space_size=128',
        env           : { 'LD_PRELOAD': '/usr/lib/x86_64-linux-gnu/libjemalloc.so.1', 'NODE_ENV': 'production' },
        env_production: { 'LD_PRELOAD': '/usr/lib/x86_64-linux-gnu/libjemalloc.so.1', 'NODE_ENV': 'production' },
        wait_ready    : true,
        listen_timeout: 2000,
        kill_timeout  : 2000,
        exec_mode     : 'cluster',
        instances     : 1
    }]
};

I just tried #1041
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1 node app.js
Memory usage below 150mb and no any memory leak issue.
But when using pm2 to start app.js, the memory leak issue still here

The LD_PRELOAD environment variable must be set before the Node process is started, so probably needs to be configured long before pm2 is involved.
Remember: this is not a memory leak, you are seeing the effects of freed, possibly fragmented memory being held by some memory allocators rather than returned to the OS.

I tried LD_PRELOAD before pm2 since system boot up, but issue still here.
Maybe issue on pm2.
Because I tried
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1 node app.js
Memory usage below 150mb and no any memory issue.
Any way, I'm sure LD_PRELOAD environment variable was set before the Node process is started.

Thanks, it sounds like you'll need to ask the pm2 maintainers about this - good luck!

Finally, I found out the problem!
This issue only issue on pm2 cluster mode.
pm2 fork mode able to load libjemalloc correctly but cluster.
Some how the pm2 cluster mode unable to load libjemalloc correctly.

@Cow258  Add 'max_memory_restart' to limit memory？

@Cow258 Add 'max_memory_restart' to limit memory？

if restart when processing image that cause data lose.
so far, using pm2 fork mode will not memory leak

@Cow258 Thanks for documenting your investigation, this has helped me with a similar concern. I'm using pm2 in cluster mode and I notice memory start low and climb up to the max available. The frustrating part is not being able to use cluster mode with pm2 in this situation - this only appears to be related to using this sharp package on a Node.js instance/cluster though.

@Cow258 also - the way the docs for pm2 explain max_memory_restart option when in cluster mode is that it's graceful reload so you shouldn't have data loss - I'd be curious to know if you experienced data loss when using this option.https://pm2.keymetrics.io/docs/usage/memory-limit/

@Cow258 also - the way the docs for pm2 explain max_memory_restart option when in cluster mode is that it's graceful reload so you shouldn't have data loss - I'd be curious to know if you experienced data loss when using this option.https://pm2.keymetrics.io/docs/usage/memory-limit/

You are correct, graceful reload will not have data loss, but if user uploading 100+ images to your server, this may cause the server to fail to restart in time and then run out of memory and then the server will hang out.
I'm using AWS free tier and transfer data to new account each year, so i got a EC2 with 1CPU and 1GB Ram, that mean i only have limited memory. Also it is running about 3 web server of Node.js with using Sharp.js. Now all server is running on PM2 fork mode without any memory leak problem.

Here are screenshot. After 32 days up time, it still below 150MB of RAM usage.
Finally, I will keep asking to PM2 maintainers about this.

Some update for this issue
https://github.com/Unitech/pm2/issues/4375#issuecomment-652366370
We can use Cluster mode with LD_PRELOAD now!!!
Required to set LD_PRELOAD environment variable before pm2 start,
So...
Add LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1
Into /env/environment
Also do
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1
Then
sudo reboot
The cluster mode will working with LD_PRELOAD=xxxx,
Not issue when processing many big size images with sharp.js.

Update
https://github.com/Unitech/pm2/issues/4375#issuecomment-898658080
Some how I got memory leak again this few week.
So I switched to jemalloc 5.2.1 to fix memory leak issue.
Here are some tutorial
Install latest jemalloc 5.2.1 on Ubuntu 18
Refer: https://gist.github.com/diginfo/be7347e6e6c4f05375c51bca90f220e8
sudo apt-get -y install autoconf libxslt-dev xsltproc docbook-xsl
git clone https://github.com/jemalloc/jemalloc.git
cd jemalloc
autoconf
./configure
make dist
sudo make install

You can found jemalloc at /usr/local/lib/libjemalloc.so.2
sudo su
vi /etc/enviroment

# Then add this line
LD_PRELOAD=/usr/local/lib/libjemalloc.so.2

Then
export LD_PRELOAD=/usr/local/lib/libjemalloc.so.2

Then optional reboot sudo reboot

A reminder to those visiting this page, as I see a number of recently-linked issues: this is not a memory leak, you are seeing the effects of freed, possibly fragmented memory being held by some memory allocators rather than returned to the OS.
Make sure you're using the latest version of sharp (v0.29.0 as of writing), which will determine the memory allocator is in use and adjust concurrency accordingly.
https://sharp.pixelplumbing.com/install#linux-memory-allocator

Update
I faced this problem again in a week, and it took me 2 days to solve it
After seeing this comment, I got the answer
https://github.com/nodejs/help/issues/1518#issuecomment-997221787
Somehow, the LD_PRELOAD environment variable may not work
You need to modify /etc/ld.so.preload to solve this problem
# make install version
sudo echo "/usr/local/lib/libjemalloc.so.2" >> /etc/ld.so.preload

# apt-get version
sudo echo "/usr/lib/x86_64-linux-gnu/libjemalloc.so" >> /etc/ld.so.preload

Then restart all node processes to use jemalloc for allocation:
# If you are using pm2
pm2 kill
pm2 resurrect

Then check the PID of your running node process and plug it into the command below to verify it is using jemalloc:
ps aux | grep node
cat /proc/<PID>/smaps | grep jemalloc

Update
I faced this problem again in a week, and it took me 2 days to solve it
After seeing this comment, I got the answer
https://github.com/nodejs/help/issues/1518#issuecomment-997221787
Somehow, the LD_PRELOAD environment variable may not work
You need to modify /etc/ld.so.preload to solve this problem
# make install version
sudo echo "/usr/local/lib/libjemalloc.so.2" >> /etc/ld.so.preload

# apt-get version
sudo echo "/usr/lib/x86_64-linux-gnu/libjemalloc.so" >> /etc/ld.so.preload

Then restart all node processes to use jemalloc for allocation:
# If you are using pm2
pm2 kill
pm2 resurrect

Then check the PID of your running node process and plug it into the command below to verify it is using jemalloc:
ps aux | grep node
cat /proc/<PID>/smaps | grep jemalloc

Update
I faced this problem again in a week, and it took me 2 days to solve it After seeing this comment, I got the answer nodejs/help#1518 (comment)
Somehow, the LD_PRELOAD environment variable may not work You need to modify /etc/ld.so.preload to solve this problem
# make install version
sudo echo "/usr/local/lib/libjemalloc.so.2" >> /etc/ld.so.preload

# apt-get version
sudo echo "/usr/lib/x86_64-linux-gnu/libjemalloc.so" >> /etc/ld.so.preload

Then restart all node processes to use jemalloc for allocation:
# If you are using pm2
pm2 kill
pm2 resurrect

Then check the PID of your running node process and plug it into the command below to verify it is using jemalloc:
ps aux | grep node
cat /proc/<PID>/smaps | grep jemalloc

Thank you for the solution, but I still have to warn people here, this solution may cause errors used by other frameworks,  when I am using “puppeteer”, it reports the error "ProtocolError: Protocol error (Page.navigate): Target closed.", in the process of troubleshooting, I found that it is in conflict with the current solution

@anhiao Thanks for the warning, this problem with puppeteer is unrelated to sharp, and probably also unrelated to jemalloc.
As an aside, there is plenty of discussion and possible solutions on the puppeteer repo e.g. https://github.com/puppeteer/puppeteer/issues/1947 - Make sure you're providing enough RAM for peak memory usage, which may be higher or lower under a different allocator, as well as understanding its configuration relating to memory e.g. --disable-dev-shm-usage. Further questions about puppeteer should be directed to the puppeteer repo.


.has-error:first :input

If first input is select-object focus of form is not possible unless form is at top of page...
var $input = this.$element.find(".has-error:first :input");
changing :input to :select
helps...but kills generic field-check...

hmm this also helps. is this sufficient? just leave select/input etc. away...
var $input = this.$element.find(".has-error:first");