Error while adding new Action
Just installed Tracks 2.1 in my local box, but I got very strange behavior from Tracks.
Steps to reproduce
1. Fill in description, project (existed), context (existed) and due date on the new Action form.
2. Click "Add action" button
Expected result:
The action will be created with no any mistake.
Actual result:
1. System shows message "There was an error retrieving from server: error".
2. There is a dialog popup saying "New context 'XXXXX" will be also created. Are you sure?", "XXXXX" is actually an existed context.
3. After clicking "Yes", the action could be created.
I attached the screenshot.
There is no error message stored in log file.
And in my another environment, same code, same database but has no this issue.
Environment information:
OS: Ubuntu Server 3.2.0-24-virtual
Database: sqlite3
Ruby: 1.8.7
Using rake (0.8.7)
Using RedCloth (4.2.8)
Using ZenTest (4.6.2)
Using aasm (2.2.1)
Using activesupport (2.3.14)
Using rack (1.1.0)
Using actionpack (2.3.14)
Using actionmailer (2.3.14)
Using activerecord (2.3.14)
Using activeresource (2.3.14)
Using acts_as_list (0.1.4)
Using aruba (0.2.2) from source at vendor/gems/aruba-0.2.2
Using bcrypt-ruby (2.1.4)
Using builder (3.0.0)
Using mime-types (1.17.2)
Using nokogiri (1.4.7)
Using rack-test (0.6.1)
Using ffi (1.0.11)
Using childprocess (0.3.1)
Using multi_json (1.1.0)
Using rubyzip (0.9.6.1)
Using selenium-webdriver (2.20.0)
Using xpath (0.1.4)
Using capybara (1.1.2)
Using cgi_multipart_eof_fix (2.5.0)
Using columnize (0.3.6)
Using diff-lcs (1.1.3)
Using json (1.6.5)
Using gherkin (2.7.7)
Using term-ansicolor (1.0.7)
Using cucumber (1.1.4)
Using cucumber-rails (0.3.2)
Using daemons (1.1.8)
Using database_cleaner (0.7.1)
Using fastthread (1.0.7)
Using flexmock (0.9.0)
Using gem_plugin (0.2.3)
Using has_many_polymorphs (2.13) from source at vendor/gems/has_many_polymorphs-2.13
Using highline (1.5.2)
Using hoe (2.13.1)
Using hpricot (0.8.6)
Using htmlentities (4.3.1)
Using httpclient (2.2.4)
Using i18n (0.6.0)
Using rbx-require-relative (0.0.5)
Using linecache (0.46)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.4.1)
Using memory_test_fix (0.1.3)
Using mongrel (1.1.5)
Using mysql (2.8.1)
Using rails (2.3.14)
Using rspec (1.3.2)
Using rspec-rails (1.3.4)
Using ruby-debug-base (0.10.4)
Using ruby-debug (0.10.4)
Using ruby-openid (2.1.8)
Using rubycas-client (2.2.1)
Using rubyjedi-actionwebservice (2.3.5.20100714122544)
Using sanitize (1.2.1)
Using soap4r (1.5.8)
Using sqlite3 (1.3.5)
Using test-unit (1.2.3)
Using thoughtbot-factory_girl (1.2.2)
Using will_paginate (2.3.16)
Using yard (0.7.5)
Using bundler (1.2.1)
Steps to reproduce
1. Fill in description, project (existed), context (existed) and due date on the new Action form.
2. Click "Add action" button
Expected result:
The action will be created with no any mistake.
Actual result:
1. System shows message "There was an error retrieving from server: error".
2. There is a dialog popup saying "New context 'XXXXX" will be also created. Are you sure?", "XXXXX" is actually an existed context.
3. After clicking "Yes", the action could be created.
I attached the screenshot.
There is no error message stored in log file.
And in my another environment, same code, same database but has no this issue.
Environment information:
OS: Ubuntu Server 3.2.0-24-virtual
Database: sqlite3
Ruby: 1.8.7
Using rake (0.8.7)
Using RedCloth (4.2.8)
Using ZenTest (4.6.2)
Using aasm (2.2.1)
Using activesupport (2.3.14)
Using rack (1.1.0)
Using actionpack (2.3.14)
Using actionmailer (2.3.14)
Using activerecord (2.3.14)
Using activeresource (2.3.14)
Using acts_as_list (0.1.4)
Using aruba (0.2.2) from source at vendor/gems/aruba-0.2.2
Using bcrypt-ruby (2.1.4)
Using builder (3.0.0)
Using mime-types (1.17.2)
Using nokogiri (1.4.7)
Using rack-test (0.6.1)
Using ffi (1.0.11)
Using childprocess (0.3.1)
Using multi_json (1.1.0)
Using rubyzip (0.9.6.1)
Using selenium-webdriver (2.20.0)
Using xpath (0.1.4)
Using capybara (1.1.2)
Using cgi_multipart_eof_fix (2.5.0)
Using columnize (0.3.6)
Using diff-lcs (1.1.3)
Using json (1.6.5)
Using gherkin (2.7.7)
Using term-ansicolor (1.0.7)
Using cucumber (1.1.4)
Using cucumber-rails (0.3.2)
Using daemons (1.1.8)
Using database_cleaner (0.7.1)
Using fastthread (1.0.7)
Using flexmock (0.9.0)
Using gem_plugin (0.2.3)
Using has_many_polymorphs (2.13) from source at vendor/gems/has_many_polymorphs-2.13
Using highline (1.5.2)
Using hoe (2.13.1)
Using hpricot (0.8.6)
Using htmlentities (4.3.1)
Using httpclient (2.2.4)
Using i18n (0.6.0)
Using rbx-require-relative (0.0.5)
Using linecache (0.46)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.4.1)
Using memory_test_fix (0.1.3)
Using mongrel (1.1.5)
Using mysql (2.8.1)
Using rails (2.3.14)
Using rspec (1.3.2)
Using rspec-rails (1.3.4)
Using ruby-debug-base (0.10.4)
Using ruby-debug (0.10.4)
Using ruby-openid (2.1.8)
Using rubycas-client (2.2.1)
Using rubyjedi-actionwebservice (2.3.5.20100714122544)
Using sanitize (1.2.1)
Using soap4r (1.5.8)
Using sqlite3 (1.3.5)
Using test-unit (1.2.3)
Using thoughtbot-factory_girl (1.2.2)
Using will_paginate (2.3.16)
Using yard (0.7.5)
Using bundler (1.2.1)
Leave a comment
I have seen this error as well. I looked in my log but did not see a more descriptive error message. I check both the tracks application log as well as the apache error log. Nothing there.
I have noticed that it seems to be the second task you add. The first one after a page load works, but the second fails. I have been clicking cancel and then clicked the add action button again and it goes through.
I have noticed that it seems to be the second task you add. The first one after a page load works, but the second fails. I have been clicking cancel and then clicked the add action button again and it goes through.
on 2012-11-17 19:37 *
By
Reinier,
I am getting the same error as the author. I have noticed different behavior when Tracks is proxied by Apache over SSL vs. directly attaching to tracks on port 3000.
With Apache proxy
-- I receive the question about submitting a task and creating a new context.
-- The "Depends on" lookup also doesn't work
Connecting directly
-- Both work just fine
There are no errors in my production.log... I will try to figure out how to display errors in my javascript console as you requested.
I am getting the same error as the author. I have noticed different behavior when Tracks is proxied by Apache over SSL vs. directly attaching to tracks on port 3000.
With Apache proxy
-- I receive the question about submitting a task and creating a new context.
-- The "Depends on" lookup also doesn't work
Connecting directly
-- Both work just fine
There are no errors in my production.log... I will try to figure out how to display errors in my javascript console as you requested.
on 2012-11-19 06:10 *
By
@Reiner
I was not aware of the site.yml SSL option. I have now set it, but get the same results.
-- AJAX calls seem to just spin and never get resolved when adding or editing a task... That is the "tags" and "Depends on" fields
-- When editing, if I put in the project name, the context is update... AJAX calls for each character seem to fail quickly
-- When adding a task, context never gets updated after I type the project (This may be the default behavior since I have a default context for adds).
I was not aware of the site.yml SSL option. I have now set it, but get the same results.
-- AJAX calls seem to just spin and never get resolved when adding or editing a task... That is the "tags" and "Depends on" fields
-- When editing, if I put in the project name, the context is update... AJAX calls for each character seem to fail quickly
-- When adding a task, context never gets updated after I type the project (This may be the default behavior since I have a default context for adds).
could you see, using firebug for example, what the AJAX request looks like? I think it is using http, not https for the AJAX call.
your setup could be "improved" by using passenger. That way you don't need to use a proxy. Could be that the proxy doesn't tell the Tracks instance that it is handling ssl.
your setup could be "improved" by using passenger. That way you don't need to use a proxy. Could be that the proxy doesn't tell the Tracks instance that it is handling ssl.
on 2012-11-20 08:50 *
By tomasvaril
Hello guys, today I installed Tracks 2.1 and had a same behaviour like @cnjowang described. The only difference was, that I was not able to create anything new (projects, tasks etc.) That was really strange because all other things worked (browsing, changing settings) I have searched all the web down and up and did not find anything usefull. But finaly I have fixed it by accident :-)
My Apache2 MPM Worker is set to use utf8 default charset as well as MySQL is. I tried all possible ways to install Tracks without no success. Finaly I have installed tracks using the zip provided on getontracks.org and enabled utf8 encoding in database.yml hte created new database tables using "bundle exec rake db:migrate RAILS_ENV=production" command. Now it seems it is working without issues. Hope it could help someone?
My Apache2 MPM Worker is set to use utf8 default charset as well as MySQL is. I tried all possible ways to install Tracks without no success. Finaly I have installed tracks using the zip provided on getontracks.org and enabled utf8 encoding in database.yml hte created new database tables using "bundle exec rake db:migrate RAILS_ENV=production" command. Now it seems it is working without issues. Hope it could help someone?
I'm having the same error with 2.2.1 on heroku. The relevant log is:
2013-03-08T03:43:49+00:00 heroku[router]: at=info method=GET path=/projects.autocomplete?term=a host=jcktracks.herokuapp.com fwd="198.21.234.82" dyno=web.1 queue=0 wait=3ms connect=7ms service=60ms status=200 bytes=33
2013-03-08T03:43:49+00:00 app[web.1]: Processing by ProjectsController#index as AUTOCOMPLETE
2013-03-08T03:43:49+00:00 app[web.1]: Rendered text template (0.0ms)
2013-03-08T03:43:49+00:00 app[web.1]: Parameters: {"term"=>"a"}
2013-03-08T03:43:49+00:00 app[web.1]: Completed 200 OK in 36ms (Views: 0.9ms | ActiveRecord: 17.7ms)
2013-03-08T03:43:49+00:00 heroku[router]: at=info method=GET path=/assets/images/ui-bg_gloss-wave_70_ffdd57_500x100.png host=jcktracks.herokuapp.com fwd="198.21.234.82" dyno=web.1 queue=0 wait=1ms connect=2ms service=10ms status=304 bytes=0
2013-03-08T03:44:02+00:00 app[web.1]: Started GET "/contexts.autocomplete?term=a" for 198.21.234.82 at 2013-03-08 03:44:02 +0000
2013-03-08T03:44:02+00:00 app[web.1]:
2013-03-08T03:44:02+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::Error: ERROR: column "contexts.id" must appear in the GROUP BY clause or be used in an aggregate function
2013-03-08T03:44:02+00:00 app[web.1]: ^
2013-03-08T03:44:02+00:00 app[web.1]: LINE 1: SELECT contexts.*, count(todos.id) as todos_count FROM "cont...
2013-03-08T03:44:02+00:00 app[web.1]: : SELECT contexts.*, count(todos.id) as todos_count FROM "contexts" left outer join todos on context_id=contexts.id WHERE "contexts"."user_id" = 1 GROUP BY context_id ORDER BY position ASC):
2013-03-08T03:44:02+00:00 app[web.1]: app/controllers/contexts_controller.rb:16:in `index'
2013-03-08T03:44:02+00:00 app[web.1]: app/controllers/contexts_controller.rb:243:in `block in render_autocomplete'
2013-03-08T03:44:02+00:00 heroku[router]: at=info method=GET path=/contexts.autocomplete?term=a host=jcktracks.herokuapp.com fwd="198.21.234.82" dyno=web.1 queue=0 wait=0ms connect=1ms service=29ms status=500 bytes=752
Autocomplete works fine for projects.
2013-03-08T03:43:49+00:00 heroku[router]: at=info method=GET path=/projects.autocomplete?term=a host=jcktracks.herokuapp.com fwd="198.21.234.82" dyno=web.1 queue=0 wait=3ms connect=7ms service=60ms status=200 bytes=33
2013-03-08T03:43:49+00:00 app[web.1]: Processing by ProjectsController#index as AUTOCOMPLETE
2013-03-08T03:43:49+00:00 app[web.1]: Rendered text template (0.0ms)
2013-03-08T03:43:49+00:00 app[web.1]: Parameters: {"term"=>"a"}
2013-03-08T03:43:49+00:00 app[web.1]: Completed 200 OK in 36ms (Views: 0.9ms | ActiveRecord: 17.7ms)
2013-03-08T03:43:49+00:00 heroku[router]: at=info method=GET path=/assets/images/ui-bg_gloss-wave_70_ffdd57_500x100.png host=jcktracks.herokuapp.com fwd="198.21.234.82" dyno=web.1 queue=0 wait=1ms connect=2ms service=10ms status=304 bytes=0
2013-03-08T03:44:02+00:00 app[web.1]: Started GET "/contexts.autocomplete?term=a" for 198.21.234.82 at 2013-03-08 03:44:02 +0000
2013-03-08T03:44:02+00:00 app[web.1]:
2013-03-08T03:44:02+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::Error: ERROR: column "contexts.id" must appear in the GROUP BY clause or be used in an aggregate function
2013-03-08T03:44:02+00:00 app[web.1]: ^
2013-03-08T03:44:02+00:00 app[web.1]: LINE 1: SELECT contexts.*, count(todos.id) as todos_count FROM "cont...
2013-03-08T03:44:02+00:00 app[web.1]: : SELECT contexts.*, count(todos.id) as todos_count FROM "contexts" left outer join todos on context_id=contexts.id WHERE "contexts"."user_id" = 1 GROUP BY context_id ORDER BY position ASC):
2013-03-08T03:44:02+00:00 app[web.1]: app/controllers/contexts_controller.rb:16:in `index'
2013-03-08T03:44:02+00:00 app[web.1]: app/controllers/contexts_controller.rb:243:in `block in render_autocomplete'
2013-03-08T03:44:02+00:00 heroku[router]: at=info method=GET path=/contexts.autocomplete?term=a host=jcktracks.herokuapp.com fwd="198.21.234.82" dyno=web.1 queue=0 wait=0ms connect=1ms service=29ms status=500 bytes=752
Autocomplete works fine for projects.
Given the age of this ticket and the fact that it's filed against an old release, I'm going to close it under the assumption that it has been fixed in later releases. Please file a new ticket if this is reproducible in the current stable or master branches.