-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import-AzDataLakeStoreItem fails with Operation: GETFILESTATUS failed with Unknown Error: Specified value has invalid CRLF characters. #8141
Comments
@rahuldutta90 Can you please take a look |
@kenogr This is a problem with Httpwebrequest class used by our SDK. Setting useragent for httpwebrequest is different across netframework and netcore: NET framework: webReq.UserAgent = client.GetUserAgent(); net standard webReq.Headers["User-Agent"] = client.GetUserAgent() If you try to later thing in net framework you get the error you are getting above. When you use this az module which is using the netstandard dll of our SDK. When you use that from windows powershell, its trying to use net standard dll on netframework which gives this error. Solution: So basically if you are using windows powershell use azurerm or else use Az from powershell netcore. |
@kenogr I also hit this, i bypassed this on my local build. @cormacpayne Looks like this issue: #7462 is hitting in netcore. It also hit for me. Based on my last investigation and I pointed out that this wont be hit for spi path, because we convert it to uri. However we are hitting this for spi path also, in netcore which I do not understand. Can you please investigate? I think we need the trailing slash fix sooner since adls module is broken in netcore. |
Yes, I think you're right based upon the error. For my SPI, I also tried setting the reply URL's just in case -- doesn't work on any variant. Looks like #7462 is root cause here. |
@kenogr here is another mitigation:
Make sure you close and restart the powershell session before doing it. |
Thanks @rahuldutta90. Mitigation works perfectly. Looking forward to deployment of fix. |
@rahuldutta90 I am still getting the same error message after Mitigation. PS C:> Test-AzDataLakeStoreItem -AccountName testaccountName -Path "/" -Debug Confirm Confirm |
@naveenaggarwal where are running this Az module? Are you running this on windows powershell or net core powershell? You cannot run this on windows powershell. It needs to be run on net core powershell. |
Hi @rahuldutta90 Test-AzDataLakeStoreItem : Error in getting metadata for path How to get rid of User-Agent error? |
@T4GJuneYao Can you please read through the above recomendations: First use net core powershell not windows powershell for az modules And for a authentication bug you have to use following way to authenticate:
This authentication bug will be fixed in upcoming release. |
@rahuldutta90 Thanks for replying me. Howerver after downloading the Powershell core 6.0, I have no idea on how it work with the powershell ISE because I tried to run the ps1 file in the Powershell ISE. When is the upcoming release available? I am thinking of restoring back to AzureRm module now and waiting for the next release if it is too much time consuming on fixing this bug. |
@T4GJuneYao you can run the powershell (ps1) script file in the powershell net core like: .\test.ps1 If you have functions in powershell file, you can include it and run the function like (testfunc is a function within test.ps1, dot script includes the script): . .\test.ps1 |
The audience issue will be fixed in the last release. Until we migrate our sdk to httpclient, az module will only work in netcore powershell. |
Description
Import-AzDataLakeStoreItem fails with Operation: GETFILESTATUS failed with Unknown Error: Specified value has invalid CRLF characters.
Script/Steps for Reproduction
Module Version
Environment Data
Debug Output
The text was updated successfully, but these errors were encountered: