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.

Initial creation of paket.config produces malformed file

See original GitHub issue

Description

Running paket config add-credentials with no existing paket.config file produces a malformed paket.config file (encoding in XML header does not match actual file encoding) which subsequently cannot be read in by paket. Seems to be related to #1954

Repro steps

  1. Delete (or otherwise remove) your paket.config file
  2. Use paket config add-credentials <somedomain> to add to the credential store
  3. Run some paket command that hits the <somedomain> NuGet server (e.g. paket update)

Environment: Windows 10 Pro, 64-bit, paket 3.26.3 (also seen in 3.23.2).

Expected behavior

Command run in step 2 creates valid paket.config file; command run in step 3 uses the credentials entered in step 2.

Actual behavior

Command run in step 2 writes out a UTF-8 encoded paket.config file, but the <?xml ... ?> declaration at the top specifies it to be UTF-16. Command in step 3 is unable to read the file and exits with an error.

Known workarounds

Edit the paket.config file after creation so that the <?xml ... ?> declaration specifies UTF-8, or have an existing valid paket.config file.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
jdpagecommented, Nov 8, 2016

Doesn’t System.Xml.XmlWriter handle formatting and XML declarations and formatting and stuff properly for you? Going through that is probably safer than just assuming the file encoding.

If nobody minds I can author a pull request that uses that API instead, which should head off any possible future encoding-related problems.

0reactions
jdpagecommented, Jan 17, 2017

Finally got a chance to come back around and do the System.Xml.XmlWriter version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Suddenly MYSQL "Malformed packet" on LOAD DATA ...
I've tried removing the truncate part and just doing the import, culling the import file down to 3 lines, using old import files...
Read more >
paket config
A dependency manager for .NET with support for NuGet packages and git repositories.
Read more >
release-notes
Paket now clones git dependencies as bare repositories and configures clones under paket-files differently. Because of these incompatible changes, it is ...
Read more >
you have been kicked from this server. Malformed packet ...
This error is complete BS. Players getting kicked constantly while running because this overzealous anti cheat assumes a normal game function is cheating....
Read more >
Section 2 - Identify and Resolve Application Issues
Your first thought is to go to the webserver logs for the image servers and see why the requests are not being honored....
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