Giter Site home page Giter Site logo

Comments (14)

PedroLiu avatar PedroLiu commented on August 16, 2024

@FirmlyReality is modifying some code in my docklet respository, PedronLiu/docklet.
After his work, I will test it and send pull request to unias/docklet

from docklet.

FirmlyReality avatar FirmlyReality commented on August 16, 2024

Done. @PedroLiu you can continue to finish your work.

from docklet.

leebaok avatar leebaok commented on August 16, 2024

Good job!

@PedroLiu @FirmlyReality

from docklet.

caodg avatar caodg commented on August 16, 2024

but it did not work in my machine.

after I input username and passwd, the browser is just waiting for responses, without showing the docklet dashboard and menu.

from docklet.

caodg avatar caodg commented on August 16, 2024

The failed test is using recovery mode. When I started using reinit mode, it worked. But then I found another problem: it took several seconds to stop docklet master. What happened then ?

from docklet.

leebaok avatar leebaok commented on August 16, 2024

I work out the cause. It is the debug mode of flask

debug mode of flask will restart the process to import some modules needed by debug mode.(for example, watchdog module, it is to watch files' status so that flask can restart itself when some file changes to load the latest code)

But this will cause some work before flask lost and some threads becoming zombies. So, the running and stopping works abnormally.

I disabled the debug mode of flask in httprest.py now and it works fine.

#78

from docklet.

caodg avatar caodg commented on August 16, 2024

@PedroLiu @leebaok

There is still problems in my test.

When I login, I get the following error:

simplejson.scanner.JSONDecodeError
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Traceback (most recent call last)
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1836, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 33, in reraise
raise value
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 33, in reraise
raise value
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/root/docklet/web/web.py", line 64, in login
return loginView.as_view()
File "/root/docklet/web/webViews/view.py", line 28, in as_view
return self.get()
File "/root/docklet/web/webViews/authenticate/login.py", line 42, in get
refreshInfo()
File "/root/docklet/web/webViews/authenticate/login.py", line 24, in refreshInfo
result = dockletRequest.post('/user/selfQuery/', data)
File "/root/docklet/web/webViews/dockletrequest.py", line 17, in post
result = requests.post(endpoint + url, data = data).json()
File "/usr/lib/python3/dist-packages/requests/models.py", line 808, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 516, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

from docklet.

caodg avatar caodg commented on August 16, 2024

@PedroLiu
So Peidong, would you please test the code completely, especially for an already running instance?

from docklet.

PedroLiu avatar PedroLiu commented on August 16, 2024

@caodg I met a bug every time when I restart docklet-master, you can stop it and init it, then this problem will not happen, I thought it was my machine's problem.
And @zhongyehong 's last pull request will cause a bug, please run tools/upgrade.py first

from docklet.

caodg avatar caodg commented on August 16, 2024
  1. Obviously we can not init a running system, if the system already having many users and workspaces. We can only restart the system in recovery mode, to ensure that the users' data and settings will not get lost.
  2. I have run the upgrade.py, the problem still exists.

from docklet.

PedroLiu avatar PedroLiu commented on August 16, 2024

I tested all functions on my computer... I will solve these problems in several days

from docklet.

caodg avatar caodg commented on August 16, 2024

Maybe everyone has their own understanding of "having tested all functions". But for a practical system, the only judgement is if it works as expected. You said "I met a bug every time when I restart docklet-master, ... stop it and init it, then this problem will not happen". So, do you think "init" is an expected solution, or "it was my machine's problem" is really the true cause? Is there indeed any difference between your machine and my machine?

@leebaok
Libao, if we can not solve this problem quickly, I think we had better resolve back to the previous version. Although it looks a bit ugly, at least it works.

from docklet.

PedroLiu avatar PedroLiu commented on August 16, 2024

I met this bug before, try logout first, then it will not happen...
I'm working on it to find how it occurs

from docklet.

PedroLiu avatar PedroLiu commented on August 16, 2024

Solved.
This bug occurs when user token expires because of returning a dict in wrapper function.
I also modified 500 page, Now a 500 page will be shown when 500 error occurs in web.py.
See pull request #79

from docklet.

Related Issues (20)

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.