question-mark
Stuck on an issue?

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

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

Git Commit & File Hashing problem

See original GitHub issue

Hi,

I have a problem for a few days with canvas-sketch exports. During my exports with cmd + K I have a message in the console who said :

→ Nothing new to commit.  
 Error: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
  at ServerResponse.setHeader (_http_outgoing.js:470:11)
  at respond (/usr/local/lib/node_modules/canvas-sketch-cli/src/middleware.js:62:9)
  at commit.then.result (/usr/local/lib/node_modules/canvas-sketch-cli/src/middleware.js:144:7)
  at process._tickCallback (internal/process/next_tick.js:68:7)

I don’t know why, and each time the canvas is refreshed, the exported drawing always has the same hash.

If somebody have an idea 😃

Thank you

Julien

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
mattdeslcommented, Feb 28, 2021

@aaronpenne Can you try npm install canvas-sketch-cli@1.11.13 --global and then re-run and let me know if the error persists?

(If you’re using the tool locally e.g. in package.json scripts just use --save instead of --global)

1reaction
kgolinskicommented, Dec 2, 2020

Hi,

I get this error every time I use the cmd+K feature. I am using node v14.15.1

  → Committing latest changes...  
[master 89ba1dd] [test.js] 2020.12.02-09.52.58
 1 file changed, 1 insertion(+), 1 deletion(-)


  Error: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client

    at ServerResponse.setHeader (_http_outgoing.js:558:11)
    at respond (/usr/local/lib/node_modules/canvas-sketch-cli/src/middleware.js:64:9)
    at /usr/local/lib/node_modules/canvas-sketch-cli/src/middleware.js:146:7
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

events.js:292
      throw er; // Unhandled 'error' event
      ^

Error [ERR_STREAM_WRITE_AFTER_END]: write after end
    at writeAfterEnd (_http_outgoing.js:668:15)
    at ServerResponse.end (_http_outgoing.js:788:7)
    at sendError (/usr/local/lib/node_modules/canvas-sketch-cli/src/middleware.js:32:9)
    at /usr/local/lib/node_modules/canvas-sketch-cli/src/middleware.js:148:7
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
Emitted 'error' event on ServerResponse instance at:
    at writeAfterEndNT (_http_outgoing.js:727:7)
    at processTicksAndRejections (internal/process/task_queues.js:81:21) {
  code: 'ERR_STREAM_WRITE_AFTER_END'
}

Changes are added and commited but the error is always triggered and canvas-sketch quits. I tried to investigate but failed for now 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

hook - In Git, how can I write the current commit hash to a file ...
Use a script to increment 'commit id' and include it somewhere. Ugly .gitignore the file you're going to store the hash into. Not...
Read more >
hash-function-transition Documentation - Git
It uses the SHA-1 hash function to name content. For example, files, directories, and revisions are referred to by hash values unlike in...
Read more >
Git: Cryptographic Hashes - Eric Sink
When you commit a file into your repository, Git calculates and remembers the hash of the contents of the file. When you later...
Read more >
Whatever happened to SHA-256 support in Git? - LWN.net
Yes, so you could replace the contents of a file (blob object), or the tree object, or the commit object itself, by finding...
Read more >
Oh Shit, Git!?!
Oh shit, I need to undo my changes to a file! # find a hash for a commit before the file was changed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

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

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found