Closed akawoj closed 5 years ago
I have a theory, however, I need to know on what domain you are using the plugin.
I have a theory, however, I need to know on what domain you are using the plugin. …
redmine.something.pl
I think you'll have to contact Toggl to whitelist your domain. I had to do it for my own setup as well. I'm trying to figure out a work around for this.
What should I say to them? What do you mean by whitelist my domain? I was using toggl API for another plugin for redmine, from the same domain and it was working fine.
Since some of the requests in my plugin are being made from client-side JS, Toggl needs to whitelist your domain. Just send them a link to my plugin and tell them that the requests are failing and that you want them to allow requests from your domain. Don't forget to send them the domain though :)
thx, working on it
My domain has been whitelisted and workspaces are loading properly.
Now I got another problem - I can't see any hours from toggl - there is only endless loader on "Time logged on Toggl" section. I also have "Invalid Date" in "Last imported on" section.
Can you tell me the version of Redmine you're using? Also, can you check the developer console to see if there are any JavaScript errors?
BTW, just curious. Have you followed the installation instructions correctly? Especially the step where you run the migrations?
We are using Redmine 3.4.9.stable
The errors from javascript console:
[Error] RangeError: Invalid Date
toISOString (t2r.js:720)
_getRawTogglTimeEntries (t2r.js:720)
getTogglTimeEntries (t2r.js:765)
updateTogglReport (t2r.js:842)
(anonimowa funkcja) (t2r.js:413)
> T2RConsole.setVerboseMode(1)
< undefined
> T2RConsole.setVerboseMode()
< undefined
> T2RConsole.setVerboseMode
< function (status) {
T2R.browserStorage('t2r.debug', status == true);
}
[Error] RangeError: Invalid Date
toISOString (t2r.js:720)
_getRawTogglTimeEntries (t2r.js:720)
getTogglTimeEntries (t2r.js:765)
updateTogglReport (t2r.js:842)
(anonimowa funkcja) (t2r.js:413)
And yes, we've done the migrations
I think you're a victim of issue #43 as well. The migrations probably didn't run well. Try running the migrations again with the latest code on the master
branch.
RAILS_ENV=production bundle exec rake redmine:plugins:migrate
After this, try the plugin again. While you're on the plugin page, try doing a hard refresh and let me know how it goes.
If the problem persists, we can probably setup a screen sharing session so that I can see what's going and find the right fix.
Hi,
I used the lastest code and did the migrations. No it works on macOS Chrome, still doesn't work on Safari (I did "hard refresh"). I will check it with other people on Safari and let you know.
Aha! That might explain it. I've never tested it on Safari because it's a browser that not many people use. It's like Apple's Internet Explorer 😅 I'll do some tests on Safari.
@akawoj I think it should work for you now. I tested it on Safari and found it to be working. There were three problems:
Date.parse()
Date.parse()
with new Date(y, m, d, h, i, s, ms)
The fixes are in the 3.x branch. Let me know if you can use the plugin now.
I've installed the latest version, did the hard refresh and still no luck on Safari ("invalid date" errors in javascript console)
That is highly strange. So, you did:
If the above steps don't work for you, would you be able to do a screen-sharing session so that I can help you further?
As for me, it now works correctly on Safari as well as Chrome.
It work, I had to manually clean Safari cache. Thanks for your help and very good work with plugin.
Hi,
thanks for great work!
I'm trying to use this plugin, but after providing API key I got: "Could not fetch Toggl Workspaces. Please refresh the page to try again." error on Toggl tab in Redmine. The timelog table below is empty. How can I fix this or find the reason of such behaviour?