GM-Script-Writer-62850 / PHP-Scanner-Server

Allows you to use your Linux install as a web based scanner server thus allowing you to scan with any web enabled device; Now supports server side printing! (As of 1.4.11)
59 stars 17 forks source link

Error while sending files scanned by email #45

Closed locopine closed 4 years ago

locopine commented 6 years ago

When I send the scanner by email, I receive the following message:

{"title":"404 Not Found","message":"No scan or domain specified"}

Can someone tell me what it's about?

Thankful.

GM-Script-Writer-62850 commented 6 years ago

I assume you got that via the your browsers debug info Your from field when sending a email needs to be your email address including the @emailSite.org part when that field it altered the page looks up the email servers config based on the emailSite.org part if there is no at website part in the field the server would return that data

The only other way to get that data from the server is to have null data file names for the data if that is what is happening i need to know what page you are on eg just scanned/edited/all scans page and mult-file or not and if it is mult-file something is very screwy as there should be a empty array to get something else to happen there is a hidden input field above the from field you can see with inspect element you can view the content of this field with this line in a JS scratchpad ([Shift]+[F4] in firefox)

(document.email.file||document.email.json).value // show field content
(document.email.file||document.email.json).value==null // Print true or false (true mean there is a problem)
locopine commented 6 years ago

Thank you very much for responding!

As I see it, even the name of the file being written in the hidden field that you commented on, the file is not actually sent to the "tmp".

I debug before the conditional arrival that checks $ _POST and JSON and both do not satisfy the condition (true).

In short, as soon as I get some time, I do a few more checks.

Finding the reason or any other question arises, I return the contact.

Again, very grateful.

GM-Script-Writer-62850 commented 6 years ago

While if you read my coding it looks like it will put the file in /tmp/ it really does not with systemd apache2 has a rather annoying feature called privateTmp that makes /tmp/ a fake one which prevents sharing data between programs via /tmp in the name of security this should not be a issue for this project until you are trying to debug something and this happens I became aware of this feature when i was having issues passing data between python scripts and apache2 on my raspberry pi

That said i think i found the issue that is likely happening to you, on my local system i seem to be missing a comma on line 1521 of res/main.js

GM-Script-Writer-62850 commented 6 years ago

I looks like i overlooked a comma on 2018/06/05 Thanks for the bug report

GM-Script-Writer-62850 commented 6 years ago

Please clear your browser's recent history your email login will be in your history as a result of that bug

locopine commented 6 years ago

It's cool that I participated, even indirectly, in resolving the bug!

I believe it to be my first participation in an application I tested.

If it were not for the current rush, which is why I was forced to go in search of something of the genre to be incorporated into a project, I would not have reached that application, I would not have come across the bug. This point was exactly what I needed !!!

Success.

If I can be useful in anything else, give me a ring ...

Thank you very much.