dev-rke / Codiad-ToDo

ToDo-List Plugin for Codiad-IDE
3 stars 3 forks source link

Page hangs on load after being logged in. #2

Closed ghost closed 8 years ago

ghost commented 8 years ago

https://github.com/Codiad/Codiad/issues/897

dev-rke commented 8 years ago

As i am not using Codiad anymore i need to install it and need to understand, what they changed in their application. I'll give it a try on the weekend, maybe it's just a little change in initialization. Do you get any javascript errors in the web developer console (press CTRL+F12 in Chrome or FF to open it)?

ghost commented 8 years ago

Yes, I got one error: Uncaught TypeError: Cannot read property 'split' of undefined

dev-rke commented 8 years ago

Sorry, hadn't much time the last days. I cannot reproduce your error. Using Codiad 2.7.2 from git master branch works perfectly fine with Codiad-ToDo-Plugin. Will it work if you install only Codiad-ToDo and disable all other plugins?

Can you provide further information (browser, operating system, conflicting plugins).

ghost commented 8 years ago

Even if everything else is disabled, it does not work and the error appeared.

Tryed with Windows 10, Debian 8, Kubuntu with the google chrome 48.0.2564.109 (64-bit)

dev-rke commented 8 years ago

That is bad. Can you please provide a screenshot of the full error message from developer tools? I need the exact line of code which throws the error. Can you also please provide the steps you do when using the application? Example:

  1. Login
  2. Project is opened
  3. File xyz.js opens automatically due to last session etc.
ghost commented 8 years ago

Here is the screenshot. The error in red will only appear once the plugin is activated: bildschirmfoto1 bildschirmfoto2

It does not matter which file is opened. The error event always occurs.

  1. Login
  2. Last Projekt is Open
  3. Three Files are opened from the last session.
  4. Page hangs
dev-rke commented 8 years ago

Ok seems Content isn't an empty string. Does it work if no files are opened from last session? E.g. close all files, log out and log in again.

ghost commented 8 years ago

Ok, when I close all Files, install the Plugin and reopen the files the error no longer appears.

But when I refresh the Page, the same error appears.

It looks like that if content at startup is not empty, the error occurs

dev-rke commented 8 years ago

What do you mean with "refresh the Page"? Have you tried reloading the plugin without browser cache using CTRL+F5? I tried it with Chromium 49 and Firefox 45 with Ubuntu 14.04, can't reproduce your error. I also uninstalled all other plugins, still cannot reproduce it. Do you really use the latest Codiad version (Codiad v2.7.2)?

ghost commented 8 years ago

What do you mean with "refresh the Page"?

I mean, that I reopen the Page in a new Browser-Session.

Have you tried reloading the plugin without browser cache using CTRL+F5?

Yes

I tried it with Chromium 49 and Firefox 45 with Ubuntu 14.04, can't reproduce your error.

Google Chrome 48.0.2564.109 (64-bit)

Do you really use the latest Codiad version (Codiad v2.7.2)?

Yes

it may rests against the web server (software)?

dev-rke commented 8 years ago

I mean, that I reopen the Page in a new Browser-Session.

Hm. So it works when you reload the page using CTRL+F5? And it works not, when you reload the page by closing the current browser and reopen the browser again? This sounds a bit like a caching problem for me. Do you have access to the apache server configuration files? Can you provide a screenshot of the http headers of the Codiad-ToDo-init.js file in the network tab (i am interested in the cache settings of your webserver) when it does not work.

ghost commented 8 years ago

Hm. So it works when you reload the page using CTRL+F5?

No, I could better explain it that way. It does not work on any way.

dev-rke commented 8 years ago

Ok, can you ensure you have the latest codiad version installed (v2.7.2)?

ghost commented 8 years ago

Yes

dev-rke commented 8 years ago

Ok, as seen here, the getContent method returns nothing if there is no "active" editor: https://github.com/Codiad/Codiad/blob/master/components/editor/init.js

This means my further code fails. I try to fix this, hopefully today, otherwise on the weekend.

dev-rke commented 8 years ago

Ok, tried to fix it, but i can still not reproduce your error. New Codiad-ToDo version is v0.1.1, maybe it takes some hours until it will be listed in codiad marketplace.

dev-rke commented 8 years ago

@oxi: does it work?

ghost commented 8 years ago

Sorry for the delay. The Initial Error was fixed and the Page reloads.

But a new error at the console:

init.coffee:61 Uncaught TypeError: Cannot read property 'getSession' of null

dev-rke commented 8 years ago

I am wondering, why you havn't an active editor item. The last fix just was a workaround, it is still unclear why the error occured in your environment. Can you please try using different browsers to see if the problem persist? Which other plugins are installed in Codiad?

dev-rke commented 8 years ago

Do you use multiple editor panes?

dev-rke commented 8 years ago

@oxi I can also reproduce your first error when i enable multi panes (split editor window horizontally). I fixed the behaviour. New version is 0.1.2. This was kind of a crazy bug, because i never used multi pane support of codiad. Please test it and give me some feedback. Thank you.

ghost commented 8 years ago

Ok, I will test this tomorrow.

ghost commented 8 years ago

Ok, I don't use multiple editor panes. But the first Error is now ok.

But The Error "init.coffee:61 Uncaught TypeError: Cannot read property 'getSession' of null" is still here.

dev-rke commented 8 years ago

New version 0.1.3 is released, i really hope i got all potential issues. They changed some parts of the codiad core, which do now behave a bit different. The bad thing is that i need to access the event handler of the ace editor to keep track for content changes, so i need to look up the currently used editor session multiple times.

Please give me some feedback if it works or not, so i can hopefully close this ticket this time. :-)

ghost commented 8 years ago

Ok, now it is fixed!

Thank you very much!

dev-rke commented 8 years ago

Best news today. :-)