Giter Club home page Giter Club logo

Comments (9)

martin-pabst avatar martin-pabst commented on July 27, 2024 1

Your workaround should work if i didn't overlook disabling all ajax requests from clients with Testuser logged in. More secure would be to use two different browsers (i.e. chrome and edge).

There have been other incidents caused by cookie session storage as teachers often want to log in with their own account in one browser tab and with a student account in a second browser tab. I definitely must find a better way to store/transmit sessions.

from online-ide.

martin-pabst avatar martin-pabst commented on July 27, 2024

Thank you for reporting the error!

Unfortunately i wasn't able to reproduce the error yesterday evenening so i added extensive logging server- and clientside. I don't want to disturb service during school days therefore i'll wait till thursday before i update the server. Could you please test then and tell me what has been logged on console after the error occured?

from online-ide.

krakeen06 avatar krakeen06 commented on July 27, 2024

Hello Martin, sorry for the late response, I've just happened to see your comment.

I'm going to try and see whether I can reproduce the error now. After that, I'll send you the console output.

Update: I've left the tab open for quite a while now and can't reproduce the issue anymore. I'm going to try it again during class tomorrow.

from online-ide.

krakeen06 avatar krakeen06 commented on July 27, 2024

Okay, so I actually ended up working with the IDE today and I managed to reproduce the error.

The issue: The console has no output. I attached a screenshot of the console. In the top right corner you can see the red update indicator indicating that the connection to the server has been lost.

Maybe I'm looking at the wrong console? Or have you not pushed the logging function yet?

error_onlineide

from online-ide.

martin-pabst avatar martin-pabst commented on July 27, 2024

Thank you for testing!
Unfortunately i didn't realize that there are two consoles. Internal errors are logged on the browser's console. You can reach it by pressing F12 (developer tools) and then clicking on pane "console".
Could you please repeat your test tomorrow evening? I included additional logging today and will publish the new version tomorrow morning.

from online-ide.

krakeen06 avatar krakeen06 commented on July 27, 2024

Thanks for the quick response. I'm going to test it tomorrow morning, as you said.

from online-ide.

krakeen06 avatar krakeen06 commented on July 27, 2024

Okay, so I tested the logging yesterday evening and it spat out some inaccurate NetworkManager errors, but I didn't comment on that because you said there would be more logging capabilities starting today.

Well, I have worked with the IDE today and ran into the issue. This time, the console output is much more accurate and although I have no idea about ts/js and the network management, it looks like you will be able to fix the issue with the log.

Uncaught TypeError: Cannot read properties of undefined (reading 'value') at _e.executeNode (Interpreter.ts:1282:38) at _e.nextStep (Interpreter.ts:807:30) at _e.timerFunction (Interpreter.ts:512:30) at Re.tick (World.ts:744:38) at TickerListener.Re.tickerFunction [as fn] (World.ts:551:18) at TickerListener.emit (ticker.js:100:22) at Ticker.update (ticker.js:481:37) at Ticker._tick (ticker.js:232:23)

image

As always, I hope this was helpful. Thank you for your work!

from online-ide.

martin-pabst avatar martin-pabst commented on July 27, 2024

The error message "Servlet not allowed" is issued if the server assumes that user "Testuser" is logged in and wants to save files.

Did you have another browser tab open where you where logged in as Testuser (by clicking on Button "Login als Testuser" at the login page)? This would explain this behaviour as browsers have a shared cookie store for browser tabs with the same URL-domain.
If you first log in with your credentials in browser tab A then a session cookie is stored. If you then login as Testuser in browser tab B then this cookie is overwritten by the session cookie of tab B.
If then the online-ide in tab A stores its files it presents this cookie to the server which then concudes that user Testuser wants to send the files.

from online-ide.

krakeen06 avatar krakeen06 commented on July 27, 2024

Oh wow, I did actually always have a second tab open with the test user logged in. I never thought that could cause issues. Thanks for the explanation, it makes sense!

As I understand it, a workaround is to always first log in with the test user on the first tab and then open a second tab with the actual account so the session cookie of my actual accounts overwrites the test user credentials?

from online-ide.

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.