Error 1101: Could not get response with specified URL

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

I will refresh the topic: is it possible to add and how a message, for example, when the website is unavailable or there is no internet on the device, so that an error message appears on the application?

Use a notifier component to display a message.

Use the Webviewer error event block to capture a failed url.

OK, thanks for your help - I'll keep fighting :wink:

I don't know what I'm doing wrong, but the error message is not showing up?

I tried that too - and nothing...

image

Probably be a page of sorts is being loaded, (the website will load an error page, so the event does not fire because a page has been loaded). It is a bit hit and miss, in my opinion.

Something like this happened to me and it works :slight_smile:

If there is no internet on the smartphone or in the lancontroller - the error message is displayed: "check network"

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.