While running a simple visual studio webtest (ensure that my SERVER responds appropriately to a GET request), I get an appropriate response (i.e. the value for the key I'm passing as a parameter). However, the test fails with the following error:
"Request failed: Value cannot be null.
Parameter name: uriString"
and the only available stacktrace reading:
System.ArgumentNullException: Value cannot be null.
Parameter name: uriString
at System.Uri..ctor(String uriString, UriKind uriKind)
at Microsoft.VisualStudio.TestTools.WebStress.WebTestInstrumentedTransaction.ProcessCompletedRequest(Boolean completedSynchronously)"
I don't use a uriString variable anywhere in my code.
Any suggestions on how to fix this?
Figured it out, and it wasn't an issue with the test. My setup was responding with a 302, which needs a redirection header that was not being populated (I intended to use a 200, but confused HTTPStatusCode Found with OK), which caused the above
Related
I am trying to automate file uploading via cypress but getting the error below.
I am not finding the root cause of the issue.
enter code here
The following error originated from your application code, not from Cypress.
Script error.
Cypress detected that an uncaught error was thrown from a cross origin script.
We cannot provide you the stack trace, line number, or file where this error occurred.
Check your Developer Tools Console for the actual error - it should be printed there.
It's possible to enable debugging these scripts by adding the crossorigin attribute and
setting a CORS header.
When Cypress detects uncaught errors originating from your application it will automatically
fail the current test.
This behavior is configurable, and you can choose to turn this off by listening to the
uncaught:exception event
Below is my code
it('Single File Upload-DOM', () => {
cy.visit('http://127.0.0.1:5500/Help%20Folder/fileupload.html')
cy.get('#file-upload1').attachFile('dog_small.jpg')
cy.get('span#fileName1').should('have.text','dog_small.jpg')
});
You can turn off the exception check globally by writing:
Cypress.on('uncaught:exception', (err, runnable) => {
return false
})
under cypress/support/index.js
I want to send data on my web server from esp32. ESP32 can not get to website and reboot.
I used exaples from Arduino IDE.
I've tried to post(htt.POST("X")) something and got same error.
I marked code to find which line cause the problem.
Googled.
...
msg="192.168.4.22/parametr";
if(WiFi.status() == WL_CONNECTED){
if(client.connect(host,httpPort)){
http.begin(msg);
Serial.print("0");
Serial.print("[HTTP] GET...\n");
int httpCode = http.GET();
Serial.print("1");
...
I expect to get to website, but now esp32 reboots when achived http.GET() and never prints "1".
Error message: Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
The URL you are passing to http.begin() is incorrect. You need to include the http:// prefix (see here). Semantically, it makes more sense to name this variable url rather than msg.
Also ... Check the return value of http.begin() - in case it is still failing.
const char *url = "http://192.168.4.22/parametr";
// Check Wi-Fi connected, etc.
if (!http.begin(url)) {
Serial.println("HTTP client failed to connect ...");
}
else {
int httpCode = http.GET();
// etc.
}
The LoadProhibited fatal error indicates an attempt to read or write an invalid memory location. When the library failed to parse the URL you provided, some member of the HTTPClient object may have been left uninitialized.
Log output
To assist your debugging, try setting the 'Core debug level' in the Arduino IDE to 'Debug'.
Arduino IDE -> Tools -> Core Debug Level -> Debug
This will ensure that the ESP log messages - such as might be printed if initialization of the HTTP client fails - will be printed over the serial port.
For example, this is the log output I see if I fail to include the http:// protocol specifier in the URL (after changing the core debug level).
Dim objHTTPRequest As MSXML2.XMLHTTP
Set objHTTPRequest = New MSXML2.XMLHTTP
With objHTTPRequest
.Open MethodName, strRequest, Asynchronous, strUserName, mstrPassword
'___________more code here___________
End with
I am trying to create a serverConnection object by getting the input parameters from the user using a visual basic form. When run the code, I am getting the following error when executing the above code part. I am working on a word add-in and this error is only occurring when I run the code through vb and the created .dll for the product is working properly with Word.
The following error occurred while submitting this request to a server: Method 'open' of object 'IServerXMLHTTPRequest2' failed
The server address() may be incorrect
in here,
strRequest= "/api/a1/Properties"
If anybody could, Please tell me why is this happening. Because of that error, I am unable to debug the code for further modifications.
The code below works fine for me if I use an http URI, but fails for equivalent https alternative. It works fine when built and run on another machine or when I include it in another app.
GetStringAsync throws an exception: “Exception thrown at 0x770B5722 (KernelBase.dll) in .exe: 0x000006F4: A null reference pointer was passed to the stub. occurred”.
ThreadPool::RunAsync(ref new WorkItemHandler([this](IAsyncAction^ action)
{
HttpClient^ client = ref new HttpClient();
auto uri = ref new Uri(L"https://....");
auto t = create_task(client->GetStringAsync(uri));
t.then([](String^ response)
{
// response should be valid.
});
}));
Running netsh winsock reset to reset the network stack seems to fix the issue!
For me, network stack reset didn't help at all, even device reboot didn't help, but your own answer have pointed me in the right direction: it wasn't my code who suddendly went mad, it was Windows. So what actually helped in my case is starting app without debugger (that is, from Start menu) - after that app continues to work fine when started from Visual Studio. It have happened a few times now, and I can confirm that it always helps.
Recently I updated the scheme from http to https in my window phone app. So far network request works fine.
However, the live tile is not working anymore.
Then I tried to debug and found that:
System.ArgumentException occurred at Microsoft.Phone.TaskModel.Interop.ApplicationHost.GetFileSystemPath(String uri)
Also:
System.Reflection.TargetInvocationException occurred Message:
A first chance exception of type
'System.Reflection.TargetInvocationException'
occurred in mscorlib.ni.dll
Additional information: Exception has been thrown by the target of an
invocation.
Finally:
at Microsoft.Phone.TaskModel.Interop.ApplicationHost.GetFileSystemPath(String uri)
at Microsoft.Phone.Shell.ShellTileData.GetLocalFilePath(Uri imageUri)
at Microsoft.Phone.Shell.UriToLocalStoreConverter.Convert(Object value, Type targetType, Object parameter, CultureInfo culture)
at Microsoft.Phone.Shell.ShellTileData.SerializeToToken(IPMTileInfo token)
at Microsoft.Phone.Shell.ShellTile.Update(ShellTileData data)
at AlarmScheduledTaskAgent.ScheduledAgentSettings.updateLiveTileUI()
I know the issue comes from the URI image for liveTile because if I change back to http liveTile is loading the image correctly. Also I tried to use another http image it doesn't crash. But if I use another https image online it crashes.
Although I didn't find anything indicating liveTile doesn't support https, anyone knows how to fix the issue? Thanks!