Git Product home page Git Product logo

wopi-validator-cli-python's Introduction

WopiValidatorExecutor

WopiValidatorExecutor is a command line application which executes the WopiValidator tests to verify the host’s WOPI Implementation.

For more details, please refer the documentation at Wopi Validator Application

Pre-requisite

Ensure that you have Python Version >= 2.7 installed.

Installation Guide

If you have Python 2 >= 2.7.9 or Python 3 >= 3.4 installed from python.org, you will already have pip and setuptools, but will need to upgrade to the latest version using the instructions below, (more details at - https://python-packaging-user-guide.readthedocs.io/installing/#install-pip-setuptools-and-wheel)

On Linux or OS X

pip install -U pip setuptools

On Windows

python -m pip install -U pip setuptools

Installation Steps

Installation from the source tree :

$ python setup.py install
  • On systems similar to Unix, the installation places a WopiValidatorExecutor-script into a centralized bin directory, which should be in your PATH.
  • On Windows, WopiValidatorExecutor.exe will be placed into a centralized Scripts directory which should also be in your PATH.

Usage

Run the WopiValidatorExecutor by passing the WopiSrc of the .wopitest file and a valid WOPI AccessToken enclosed in quotes. :

$ WopiValidatorExecutor "wopisrc" "accesstoken"

Optional Arguments

-s: If you need to provide a specific Wopi Discovery Service Url, you can pass that Url using 
    this argument.

-c: If you need to run the WopiValidator in a specific mode, you can pass the intended 
    VALIDATOR_TEST_CATEGORY using this argument. For more details, please refer the documentation 
    at https://wopi.readthedocs.io/en/latest/discovery.html#term-validator-test-category

-v: Using this argument will turn on verbose logging.

Logs

A log file named wopivalidatorexecutor.log will be placed in the installation directory.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

wopi-validator-cli-python's People

Contributors

mandaryadav avatar microsoft-github-policy-service[bot] avatar mortonfox avatar msftgits avatar tylerbutler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

wopi-validator-cli-python's Issues

AttributeError: 'HTTPError' object has no attribute 'Code'

Im still getting this error while launching: WopiValidatorExecutor. Log says:

09/16/2016 02:07:46 PM : INFO : WOPI Discovery Service Url: https://onenote.officeapps-df.live.com/hosting/discovery
09/16/2016 02:07:46 PM : INFO : Starting new HTTPS connection (1): onenote.officeapps-df.live.com
09/16/2016 02:07:47 PM : DEBUG : "GET /hosting/discovery HTTP/1.1" 200 4223
09/16/2016 02:07:47 PM : INFO : WopiValidator TestEndpoint Url: https://onenote.officeapps-df.live.com/hosting/GetWopiTestInfo.ashx
09/16/2016 02:07:47 PM : INFO : Starting new HTTPS connection (1): onenote.officeapps-df.live.com
09/16/2016 02:07:47 PM : DEBUG : "GET /hosting/GetWopiTestInfo.ashx?testcategory=All&WOPISrc=http%3A%2F%2Flocalhost%3A9000%2Fwopi%2Ffiles%2F12&access_token=eyJhbGciOiJIUzI1NiJ9.eyJhY2NvdW50SWQiOjEsImZpbGVEb2N1bWVudElkIjoxNiwidG9rZW5UeXBlIjoiV09QSSIsImV4cCI6MTQ3NDAyOTc0MH0.5T82-SWD6aU8rfGCuva6waE11XSi13kvkLmvENr2L3U&access_token_ttl=0 HTTP/1.1" 404 1245

AttributeError: 'HTTPError' object has no attribute 'Code'

The wopivalidatorexecutor.log is created, but remains empty.
Thanks for any help.

Command:
(wopi) [wopi-validator-cli-python]$ WopiValidatorExecutor "https://ffc.officeapps.live.com/wv/wordviewerframe.aspx?IsLicensedUser=0&WOPISrc=scinote.engineering4sustainability.com/wopi/files/wopi/files/29" "token" -s "https://ffc-onenote.officeapps.live.com/hosting/discovery"

Output:
..........................WopiValidator Execution Starts....................................

Execution Failed: Check Logs for more information
Traceback (most recent call last):
File "/usr/local/.virtualenvs/wopi/lib/python3.7/site-packages/WopiValidatorExecutor-0.1.0-py3.7.egg/WopiValidatorExecutor/WopiValidatorExecutor.py", line 51, in execute_wopi_validator
File "/usr/local/.virtualenvs/wopi/lib/python3.7/site-packages/requests-2.10.0-py3.7.egg/requests/models.py", line 844, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://FFC-onenote.officeapps.live.com/hosting/GetWopiTestInfo.ashx?testcategory=All&WOPISrc=https%3A%2F%2Fffc.officeapps.live.com%2Fwv%2Fwordviewerframe.aspx%3FIsLicensedUser%3D0%26WOPISrc%3Dscinote.engineering4sustainability.com%2Fwopi%2Ffiles%2Fwopi%2Ffiles%2F29&access_token=token&access_token_ttl=0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/.virtualenvs/wopi/bin/WopiValidatorExecutor", line 11, in
load_entry_point('WopiValidatorExecutor==0.1.0', 'console_scripts', 'WopiValidatorExecutor')()
File "/usr/local/.virtualenvs/wopi/lib/python3.7/site-packages/WopiValidatorExecutor-0.1.0-py3.7.egg/WopiValidatorExecutor/main.py", line 44, in main
File "/usr/local/.virtualenvs/wopi/lib/python3.7/site-packages/WopiValidatorExecutor-0.1.0-py3.7.egg/WopiValidatorExecutor/WopiValidatorExecutor.py", line 54, in execute_wopi_validator
AttributeError: 'HTTPError' object has no attribute 'Code'

AttributeError: 'HTTPError' object has no attribute 'Code'

Our domain (test-wopi.sycamoreinformatics.com) is whitelisted under Office 365 Cloud Storage Partner Program.
But when I ran

WopiValidatorExecutor "https://onenote.officeapps-df.live.com/hosting/WopiTestFrame.aspx?ui=1033&rs=1033&dchat=false&IsLicensedUser=0&testcategory=OfficeOnline&WOPISrc=https://sgdevwopi.test-wopi.sycamoreinformatics.com/wopi/files/32" "xxxxxxxxxxx-access--token--"

I get this error:

screen shot 2018-04-12 at 1 41 46 pm

When tried to post the word view url in iframe i get a loading icon with Word Online. Thats all. Nothing else.

How should we proceed further?

Getting error while opening the file.

I've connected WOPI to the blob storage successfully. Everything appears to be in order from my end, but upon opening, I encounter a persistent issue. I've tested various file types, yet the problem persists across all of them. Any thoughts on what might be causing this?

image

Getting System.NullReferenceException when trying to launch any action

I'm getting a System.NullReferenceException when I launch any of the tests.
I'm getting a X-UserSessionId (2d376538-90bd-47f7-b448-797de11d7320) and a X-CorrelationId(2d376538-90bd-47f7-b448-797de11d7320) so the connection seems to works well.
I'm trying it from my local environment with the domain head.dev.basenet.nl:8092 and with a host mapped by Fiddler (wopi.basenet.nl point to head.dev.basenet.nl:8092) and nothing.
I'm in the allow list but not yet in the Yammer group, so any help would be very appreciated.

Thanks in advance.

System.NullReferenceException: Object reference not set to an instance of an object.\u000d\u000a at WopiValidator.Core.Requests.RequestBase.GetResponseData(HttpWebResponse response, Boolean isTextResponseExpected, TimeSpan elapsed)\u000d\u000a at WopiValidator.Core.Requests.RequestBase.ExecuteRequest(RequestExecutionData executionData, String userAgent, Boolean hasToBeSuccessful)\u000d\u000a at WopiValidator.Core.Requests.WopiRequest.Execute(String endpointAddress, String accessToken, Int64 accessTokenTtl, ITestCase testCase, Dictionary2 savedState, IResourceManager resourceManager, String userAgent, RSACryptoServiceProvider proofKeyProviderNew, RSACryptoServiceProvider proofKeyProviderOld)\u000d\u000a at WopiValidator.Core.TestCaseExecutor.ExecuteTestCase(ITestCase testCase)\u000d\u000a at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext()\u000d\u000a at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source, Func2 predicate)\u000d\u000a at WopiValidator.Core.TestCaseExecutor.Execute()\u000d\u000a at Microsoft.Office.Web.WopiTestService.ExecuteTestMethod.ProcessRequest(HttpContext context)"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.