Comments (36)
from cloudprint_logocert.
from cloudprint_logocert.
from cloudprint_logocert.
Ok, I updated my shell by running the following in my shell:
export PYTHONPATH=/Library/Python/2.7/site-packages
Now I see the following error:
Traceback (most recent call last):
File "./testcert.py", line 149, in setUpModule
getTokens()
File "./testcert.py", line 245, in getTokens
GetNewTokens()
File "./testcert.py", line 282, in GetNewTokens
creds = run_flow(flow, _storage, flags=flags,http=http)
File "/Library/Python/2.7/site-packages/oauth2client/_helpers.py", line 133, in positional_wrapper
return wrapped(*args, **kwargs)
File "/Library/Python/2.7/site-packages/oauth2client/tools.py", line 218, in run_flow
authorize_url = flow.step1_get_authorize_url()
File "/Library/Python/2.7/site-packages/oauth2client/_helpers.py", line 133, in positional_wrapper
return wrapped(*args, **kwargs)
File "/Library/Python/2.7/site-packages/oauth2client/client.py", line 1934, in step1_get_authorize_url
return _helpers.update_query_params(self.auth_uri, query_params)
File "/Library/Python/2.7/site-packages/oauth2client/_helpers.py", line 222, in update_query_params
parts = urllib.parse.urlparse(uri)
AttributeError: 'Module_six_moves_urllib_parse' object has no attribute 'urlparse'
from cloudprint_logocert.
from cloudprint_logocert.
Executing sudo pip install --ignore-installed six
fixed that issue. Proceeding.
from cloudprint_logocert.
I set the printer name to M477, and now executing testcert.py, it hangs. I'm seeing the following:
Logocert INFO: Got new access token.
Logocert INFO: Service added: "HP Color LaserJet MFP M477fdw (6D418f)._privet._tcp.local."
and then it just hangs
looks like it's running setUpModule in _zconf.py Wait_for_privet_mdns_service
I'll check if there is an issue with the way we're checking for names, as maybe it needs to be M477fdw in the _config.py file. I'll add more debug info this evening.
from cloudprint_logocert.
Wait_for_privet_mdns_service() waits indefinitely for zeroconf threads to be terminated and this is likely the case for you. I have updated the code to wait up to 30 seconds only for the threads to terminate, and continue operation regardless of successful termination or not. This is pushed to logocert_api now.
As for name checking, M477 should be matched since it is a substring of the service "HP Color LaserJet MFP M477fdw (6D418f)._privet._tcp.local."
from cloudprint_logocert.
Now it's executing after your latest change. So far I've run a couple of test suites. I'll update after I've run through all of them.
from cloudprint_logocert.
Everything is working pretty good. I've tested the test suites up to jobstate. Once I got there I see some jobs are in error or queued states:
Jobs.pdf
No jobs have printed. Attaching the last log as well.
archive.zip
from cloudprint_logocert.
Today I was running more of the jobstate tests, and I got a continual message:
LogoCert INFO: Access token expired, need to refresh it
Trying again in 1 sec(s)
Bad status code from Submit(): 403
from cloudprint_logocert.
from cloudprint_logocert.
Ok, I wonder if we should put something in the setUpModule to automatically do this if we detect this error.
from cloudprint_logocert.
from cloudprint_logocert.
Since the latest changes were made, I'm now seeing:
"No printers discovered under HP Color LaserJet MFP M477fdw".
Previously I saw:
LogoCert INFO: Service added: "HP Color LaserJet MFP M477fdw ..."
and in my _config.py I have:
'MODEL': 'M477',
'NAME': 'HP Color LaserJet MFP M477fdw',
However, when I changed 'NAME' to read 'M477fdw' it started working, so spaces might be an issue. For me it's fine if spaces are not allowed, but we should document it.
from cloudprint_logocert.
When running through the tests, when I ran the test for testJobStateEmptyInputTray, the job goes into the Queued state but the test fails, saying it didn't find the job in the queued or In Progress state.
from cloudprint_logocert.
Looks like I may need to update the printer firmware, as I think it has an issue with the version of Java.
from cloudprint_logocert.
I updated the firmware and now tests are passing as expected. For the Name string, I don't think it was related to string handling, as I think it had more to do with the printer failure to send mDNS packets. I've now completed the JobState suite, and will move to the cloud printing suite next.
from cloudprint_logocert.
I completed all of the CloudPrinting suite tests. I noticed a number of tests failed with an Error. Not sure why. Nothing was attempted to print. I've attached the log.
LogoCert2017February02_204831.log.zip
from cloudprint_logocert.
I attempted to run the LocalPrinting suite. The first print job printed; however, testcert.py bailed out with:
./testcert.py
Adding LocalPrinting to list of suites to run
LogoCert INFO: Got new access token.
LogoCert INFO: Service added: "HP Color LaserJet MFP M477fdw (6D418F)._privet._tcp.local."
LogoCert INFO: All listeners have been stopped.
LogoCert INFO: Device URL: http://192.168.1.65:80
LogoCert INFO: Got new access token.
Starting LocalPrinting testSuite
================================================================================
/Users/kdlucas/src/logocert_api/cloudprint_logocert/images/testpage.pwg not found.
Likely that this is the first time LocalPrinting suite is run.
Generating pwg-raster via cloud print
Attempting to submit a job through GCP for up to 60 seconds
Job submitted successfully
[Configurable timeout] PRINTER_STATUS:
Waiting up to 180 seconds for the printer to have status: processing
<function FetchRaster at 0x10223dc80> failed
ERROR
======================================================================
ERROR: setUpClass (main.LocalPrinting)
Traceback (most recent call last):
File "./testcert.py", line 2284, in setUpClass
getLocalPrintingRasterImages()
File "./testcert.py", line 337, in getLocalPrintingRasterImages
getRasterImageFromCloud(Constants.IMAGES['PWG1'], Constants.IMAGES['PNG7'])
File "./testcert.py", line 323, in getRasterImageFromCloud
res = _gcp.FetchRaster(output['job']['id'])
File "/Users/kdlucas/src/logocert_api/cloudprint_logocert/_cpslib.py", line 94, in VerifyNotNone
raise AssertionError
AssertionError
Ran 0 tests in 194.276s
FAILED (errors=1)
LogoCert2017February02_210849.log.zip
from cloudprint_logocert.
from cloudprint_logocert.
from cloudprint_logocert.
Ah, ok, maybe I'll turn up the debug level to debug to get more information.
from cloudprint_logocert.
from cloudprint_logocert.
Ok, I'm going to rename the spreadsheet to a unique name and run it again. It will be owned by testcloudprint30.
from cloudprint_logocert.
So I reran the tests, and all of the tests that had errors (39 of them) did not make any entry in the spreadsheet. So I'm going to rerun with debug enabled.
from cloudprint_logocert.
Here is the log file in debug mode.
LogoCert2017February05_104210.log.zip
from cloudprint_logocert.
Kevin and I were discussing possible failure scenarios, and we think that another issue here could be that some printers may not support some of the CJT options that the tests is passing in. Need to increase error messages to understand better why there are failures with certain printers in the CloudPrinting suite.
from cloudprint_logocert.
I found the culprit. It was a method for adding color options in a CJT that was raising the unhandled exception. This occurs when the printer does not include 'vendor_id' in its capabilities for color options. This issue is now fixed.
from cloudprint_logocert.
Ok, I grabbed your latest changes and all of the tests passed except one. The failure was with test PrintJpgDpiSetting, AttributeError: 'Cloudprinting' object has no attribute 'Submit'. If you log in as testcloudprint30, you can see the spreadsheet called LogoCert_api_cjtchanges for details.
from cloudprint_logocert.
I still can't get any tests to pass in the LocalPrinting suite, as when the first test runs, it does print the page, but I see:
Users/kdlucas/src/logocert_api/cloudprint_logocert/images/testpage.pwg not found.
Likely that this is the first time LocalPrinting suite is run.
Generating pwg-raster via cloud print
Attempting to submit a job through GCP for up to 60 seconds
Job submitted successfully
[Configurable timeout] PRINTER_STATUS:
Waiting up to 180 seconds for the printer to have status: processing
<function FetchRaster at 0x102841c80> failed
ERROR
======================================================================
ERROR: setUpClass (main.LocalPrinting)
Traceback (most recent call last):
File "./testcert.py", line 2283, in setUpClass
getLocalPrintingRasterImages()
File "./testcert.py", line 337, in getLocalPrintingRasterImages
getRasterImageFromCloud(Constants.IMAGES['PWG1'], Constants.IMAGES['PNG7'])
File "./testcert.py", line 323, in getRasterImageFromCloud
res = _gcp.FetchRaster(output['job']['id'])
File "/Users/kdlucas/src/logocert_api/cloudprint_logocert/_cpslib.py", line 94, in VerifyNotNone
raise AssertionError
AssertionError
from cloudprint_logocert.
The CloudPrinting error has been fixed and pushed, it was a typo in a function name. Great catch!
As for the LocalPrinting error, I can only pinpoint it to some failure in the /download GCP API call. In the setup code for LocalPrinting, Cloud Printing is leveraged for converting several images to the raster format that will be used for LocalPrinting.
The procedure goes like this:
- A Cloud Print job is created (The page that you see printed is the result of this)
- While the Cloud Print job is queued or in progress, we can download the raster format of the target image via the /download interface. (This is where the error occurred for you.)
- The raster file is saved to disk and will be used for subsequent LocalPrinting testcases
I have added better console logging in FetchRaster() so hopefully this will help us get to the root of the issue.
from cloudprint_logocert.
I have pushed up a change in LocalPrinting. It now waits on the GCP job state instead of the Privet printer state when it's determining when to access the /download API for the raster image. This should fix your issue Kelly.
from cloudprint_logocert.
Thanks for making the changes, I'll test this over the weekend.
from cloudprint_logocert.
Ok, I ran ran the local printing suite. I noticed the printer I was testing on failed tests for:
- printing in landscape mode (printed in portrait)
- failed the margins tests (printed identical margins for both printouts)
- failed selective print page numbers (printed all pages, instead of just 2 and 3)
And at the end of the tests I saw:
Verify printer respects GCP Mgt page when local printing toggled.
... Disabling local printing
[Configurable timeout] GCP_UPDATE:
Waiting up to 60 seconds for printer to accept pending settings
Local print successfully turned off
Wait for idle state before starting a local print job
[Configurable timeout] PRINTER_STATUS:
Waiting up to 180 seconds for the printer to have status: idle
Device state observed to be: idle
Attempt to get a local job id for up to 30 seconds
Got a job id
LogoCert INFO: Test ID: 533d4ac6-5c1d-4c99-a91e-2bac7c31864f
LogoCert INFO: Result: Blocked
LogoCert INFO: Name: testLocalPrintingToggle
LogoCert INFO: Notes: Able to print via privet local printing when disabled.
FAIL
======================================================================
FAIL: testLocalPrintingToggle (main.LocalPrinting)
======================================================================
Verify printer respects GCP Mgt page when local printing toggled.
Traceback (most recent call last):
File "./testcert.py", line 2349, in testLocalPrintingToggle
self.assertIsNone(job_id)
AssertionError: u'163' is not None
from cloudprint_logocert.
Ok, I tested the rest of the the printing suites, and it all looks good. I think we should be ready to close out this issue and move to the next stage of getting this branch pushed into our main branch.
from cloudprint_logocert.
Related Issues (20)
- Can LocalPrint.PDFPageRange test check if page_range is supported in CDD HOT 1
- GCP Tool Questions, version 2 HOT 1
- fails testNoMediaInTray() and testOpenPaperTray() HOT 7
- Local API Creatjob HOT 3
- fails testJobStateMissingToner() HOT 2
- fails testJobStateWithPaperJam() HOT 5
- LocalPrinting returned Failed due to “Local Print Job not found using GCP /jobs api”. HOT 7
- 1.6.34 NotInCDD.margins failed HOT 8
- PrivetRegistration.PrinterPanelCancel/PrivetAPI.RegistrationInvalidUserAuthToken failed HOT 2
- CDD.duplex failed HOT 2
- Error message for test Printer.RemoveMediafromTray doesn't match string search HOT 1
- testDeviceOffNoAdvertisePrivet issue HOT 1
- a special test file (85748k) cannot be printed through GCP HOT 1
- FitToPage option in device HOT 1
- “Could not convert to PDF” will pops up in manage GCP window when we select customized signal page of PPT to print. HOT 2
- Google converted the 1st, 2nd page of a special pdf file as blank if print on the printer which is not support PDF through GCP
- 1.13.9 & 1.13.10 have the same Test Case ID
- Google Cloud Print is not converting Excel sheet properly.
- if possible to add/support "Imaging Drum" in 1.10.8 Printer.RemoveTonerCartridg
- ZIJANG-8330 Thermal Receipt Printer is writing blank page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudprint_logocert.