SWI-Prolog / packages-pengines

Pengines: Prolog engines
11 stars 13 forks source link

Pengine #31

Closed NDE18 closed 6 years ago

NDE18 commented 6 years ago

hello I am a program on Prolog that I then hosted on a server pengine [https://swish.swi-prolog.org], which worked normally. But, since yesterday when I load my web page my prolog program does not return anything. On the console of my browser I have this: XHR finished loading: OPTIONS "https://swish.swi-prolog.org/pengine/create". jquery-2.1.3.min.js:4 Please help me to solve this problem. Thank you in advance.

NDE18 commented 6 years ago

Here is the link of my app prolog program

JanWielemaker commented 6 years ago

If I run ?- main., it seems to do something. Is this a program you run on a server of yours? The message seems more a server installation issue. Please be precise.

NDE18 commented 6 years ago

In fact, my program works when I run directly on the server online [https://swish.swi-prolog.org]. But he does not return anything when I call him from my web page. I used your example [https://github.com/SWI-Prolog/swish/blob/master/client/sin-table.html ].

JanWielemaker commented 6 years ago

Hard to say. What about sharing the web page? First step is probably to use the browser debugger and see what is happening. There has been a recent change to pengines, but all tests and the interactive site still work fine.

NDE18 commented 6 years ago

here is what the browser debugger displays:

Return value: undefined copyOptions: ƒ copyOptions(to, from, list) createOptions: {srctext: "↵:- include(wallamres).↵", format: "json", application: "swish", ask: "identify", chunk: 1000} fillDefaultOptions: ƒ fillDefaultOptions(options) options: {application: "swish", chunk: 1000, server: "https://swish.swi-prolog.org/pengine", ask: "identify", onoutput: ƒ, …} src:["↵:- include(wallamres).↵"] that: Pengine id: null options:{application: "swish", chunk: 1000, server: "https://swish.swi-prolog.org/pengine", ask: "identify", onoutput: ƒ, …} request: {readyState: 1, getResponseHeader: ƒ, getAllResponseHeaders: ƒ, setRequestHeader: ƒ, overrideMimeType: ƒ, …} proto__: Object

this: Pengine id: null options: {application: "swish", chunk: 1000, server: "https://swish.swi-prolog.org/pengine", ask: "identify", onoutput: ƒ, …} request: {readyState: 1, getResponseHeader: ƒ, getAllResponseHeaders: ƒ, setRequestHeader: ƒ, overrideMimeType: ƒ, …} proto:Object

NDE18 commented 6 years ago

My web application (www.msacad.com/wallamre)

JanWielemaker commented 6 years ago

I have a clue, but only a vague one. Working on it.

NDE18 commented 6 years ago

Thank you.

2018-02-16 14:39 GMT+01:00 Jan Wielemaker notifications@github.com:

I have a clue, but only a vague one. Working on it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SWI-Prolog/packages-pengines/issues/31#issuecomment-366237322, or mute the thread https://github.com/notifications/unsubscribe-auth/AiMQU20uvkD_RcqnjsFbzAwRHuXhahRLks5tVYUCgaJpZM4SIJfA .

JanWielemaker commented 6 years ago

Ok, pushed a fix, updated swish. All seems working again, including your application.

NDE18 commented 6 years ago

Thank you very much, it works very well. Please what was the problem?

JanWielemaker commented 6 years ago

Wrong argument order inside the pengines library after a rewrite and not passing the resulting error to the browser.

NDE18 commented 6 years ago

Thank you God bless you.