Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Couldn't find job #, is it already finished?" after each Job #188

Open
mxre opened this issue May 12, 2021 · 1 comment
Open

"Couldn't find job #, is it already finished?" after each Job #188

mxre opened this issue May 12, 2021 · 1 comment

Comments

@mxre
Copy link

mxre commented May 12, 2021

Each time I submit a print job a get the Popup "Couldn't find job #, is it already finished?"
(I use a HTTPS CUPS server with HTTP Authentication)

I think the reason for this message is that CupsService.kt:237 (updateJobStatus) and CupsService.kt:278 (getJobState) use CUPS unauthenticated to send the Get-Job-Attributes request to the CUPS server, which answers with 401 (I checked this with wireshark)

(Btw, Printing works perfectly it's more of a cosmetic thing)

@newhinton
Copy link

I think your assumption is not quite right, from analysing the code i think the stack is roughly this:

CupsService.getJobState -> CupsClient.getJobAttributes() -> IppGetJobAttributesOperation(context).getPrintJobAttributes(url, userName, jobID) -> IppOperation.request() -> IppOperation.sendRequest()

The sendRequest method handles authentication (IppOperation.kt:149), so it should work.

At the moment i think the issue may be due to a different context, because the basic auth relies on shared preferences. However, this would mean it would also fail on non-https connections. I have not yet been able to test this, since this app also needs an upgrade for all it's gradle files so that it works with newer android-studio versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants