Error 1101: Could not get response with specified URL

I have a problem with calling the GET url function (there was no problem on LK 3.0), so I created an app using MIT AppInventor - as before on LK 3.0.

After calling the function, the following message will appear:
Error 1101: Could not get response with specified URL: https://user:password@ip-address:port/outs.cgi?out4=1

What could be the problem, because I'm running out of ideas?

Does the same url work in your computer browser ?

Are you following this guide? :

Yes, I am following this tutorial. It works from the browser, but if you additionally click on the acceptance / negation of the certificate - I suspect that it blocks the option via MITTappinvertory, because there is no way to save the option to additionally confirm the certificate ...

EDIT:
So I ran tests - it's exactly as I wrote.
If you remove https in Lankontroler - in Settings and management > network - then there is no problem.
If the https service is enabled - then the GET command is not executed - because the ssl error message is reported (of course, because it is not registered) and the GET command does not work. Question: is it possible to bypass the quality of the question about unregistered ssl certificate in Appinwertory?

Check ignore SSL in the designer?

Yes, there is the IgnoreSslErrors option, but for the component: WebViewer - and I'm not talking about opening a web page (WebViewer) but about calling the url get function (Web component) and there is no ssl ignore...

What are the API instructions? Are you certain the data can be returned without using a web page interface? Have you tried with a webview?

From your images of blocks, your url looks wrong, given you are supplying the access credentials in the web header. Should be something like:
https://ip_address:port/outs.cgi?out4=1

I tried it anyway - unfortunately the error is more serious - I know how it should be.

It is and still is a problem, because there is a question about the ssl certificate that needs to be confirmed per session.

But, when the connection is without ssl - just http - works great, only that the credentials fly in plain text ...

Can you get the data back in a webview, if so you could run a javascript to scrape the data into your app that way ?

I haven't done it and have no idea how to do it... :pensive:

Try this first

ok After entering the url get command in the web browser, this appears first (ssl confirmation)

After confirmation - it actually gets to the Lankotroler and the GET function is called - the relay in the Lankotroler changes its state:

View in panel Lankontorer:
image

Now try this:

You should be able to return the rendered page content to your app (webviewstring) and extract the data from there.

This works for me based on the id of the xml element in my webview:

window.AppInventor.setWebViewString(document.getElementById('webkit-xml-viewer-source-xml').innerHTML)

image

The webviewer can be made not visible, if required.

did you test it on https?

unfortunately it doesn't work :frowning:

**
Error 1101:Unable to get a response with the specified URL: https://ip-number/outs.cgi?out3=1
**

Where has your port number gone ?

Remove check connection, use the webviewer error event block instead if connecting to the url fails

I threw out the port and did directly. And yes:
After launching the application, the following message appeared:

image

after clicking on the button - like this:
image

The blocks look like this:

BUT - when I remove the service over https in Lankontroler - and communication is only over http - everything works.
Screen - app:
image

Blocks:

So - clearly the problem is that after starting communication over https - a message about accepting the ssl certificate not-signed appears, and the application is unable to pass it - unless there is a possibility, the application first (in the background) opened this page , accepted the not-signed certificate and then performed the GET command - but is it possible?

Ok, I did it and it worked :slight_smile:

  • so far:
  1. Webviewer establishes ssl communication (ip address only) + added component: WebViewer - ignoresslErrors

  2. after pressing the Button - the GET url function is called

I wonder if this is the correct solution?

and

I would have to add and test the per-user authorization options...

code:

IT WORKED :slight_smile:
with authorization

1 Like