Giter Site home page Giter Site logo

Comments (10)

schorschii avatar schorschii commented on May 25, 2024

Can you please start companion.py in terminal and post the output here?

killall companion.py 
companion.py
# Please click on "Edit with" now. This should produce some output in the terminal.

Which version of Confluence are you using?

from companion4linux.

denis-colliot avatar denis-colliot commented on May 25, 2024

I got the following result just by viewing the file on confluence (I didn't even click on "Edit with"):

$ killall companion.py
$ companion.py
< {"type":"authentication","payload":{"provider":"jwt","payload":"<PAYLOAD>"},"requestID":1}
Error in connection handler
Traceback (most recent call last):
  File "/home/denis/.local/lib/python3.6/site-packages/websockets/server.py", line 191, in handler
    await self.ws_handler(self, path)
  File "/usr/bin/companion.py", line 265, in companionHandler
    await handleJson( websocket, json.loads(request) )
  File "/usr/bin/companion.py", line 64, in handleJson
    currentSiteTitle = requestjson["payload"]["payload"]["siteTitle"]
TypeError: string indices must be integers

I also updated my first comment with confluence version.

from companion4linux.

schorschii avatar schorschii commented on May 25, 2024

Hmm, the first line does not look like the requests from Confluence I discovered. My script expects something like this:

{"type":"authentication","payload":{"provider":"server","payload":{"siteTitle":"Übersicht"}},"requestID":1}

Your output says:

... "provider":"jwt" ...

Is there maybe something else running on your machine which connects to port 31459?

Are you using some kind of dev/beta version? At the bottom of my Confluence I see something like "Powered by Atlassian Confluence 6.15.9". Maybe Atlassian has changed something in a newer version. I'll take a closer look at that.

from companion4linux.

denis-colliot avatar denis-colliot commented on May 25, 2024

Well, JWT is a common authentication mechanism, it's not a really a surprise to see that Confluence is using it.

By the way, I am using a cloud version of Confluence: <mycompany>.atlassian.net

And there is no process on my local machine using the port 31459.

And, no such footer on my Confluence pages, I found the version through the "Help" menu on the sidebar:

Screenshot from 2020-03-30 18-26-43

from companion4linux.

schorschii avatar schorschii commented on May 25, 2024

Yes, it's not a surprise, but I never discovered it before in Companion context.

I haven't tested it yet with a cloud version of confluence. I'll take a closer look at that.

from companion4linux.

schorschii avatar schorschii commented on May 25, 2024

@denis-colliot
Can you please test the companion script from the current master branch?

from companion4linux.

schorschii avatar schorschii commented on May 25, 2024

@denis-colliot
Where are u?

from companion4linux.

denis-colliot avatar denis-colliot commented on May 25, 2024

Well I have quite a lot of work to do and testing your code is not on my top priorities list right now ;-)

But, as soon as I have a few moments, I'll give it another try and I'll come back to you.

from companion4linux.

denis-colliot avatar denis-colliot commented on May 25, 2024

Just so you know, I tried with your latest master version (c45b8fe) and it worked! \o/

Well I had to accept a system popup asking me if I trusted "atlassian.com" and then magic appeared:
Screenshot from 2020-04-07 19-16-43

Unfortunately, the confluence solution isn't well adapted for my company's problem so I no longer need your script, but keep on the good work!

from companion4linux.

schorschii avatar schorschii commented on May 25, 2024

Thanks for your feedback!

from companion4linux.

Related Issues (4)

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.