trac-code-comments-plugin icon indicating copy to clipboard operation
trac-code-comments-plugin copied to clipboard

No handler matched request to /code-comments

Open christeredvartsen opened this issue 13 years ago • 6 comments

Hi there,

Sometimes we get the following error when trying to browse the comments added to a Trac env:

No handler matched request to /code-comments

When this happens the "Code Comments" tab in the navigation is also not visible.

Version: 1.1.0 (Trac: 0.12.3)

christeredvartsen avatar Jun 01 '12 09:06 christeredvartsen

Hey, Christer, thanks for the report.

When it disappears, does it come back?

Is there anything in the trac log file? (You may need to increase the logging level)

nb avatar Jun 02 '12 07:06 nb

If gave me this error perhaps 70% of the time. If I refresh enough the comments appeared (and the tab in the navigation). After a restart of apache the error has disappeared. I didn't have logging enabled when this occurred. I have enabled logging now and will have a look if the error comes back. Closing for now.

christeredvartsen avatar Jun 02 '12 07:06 christeredvartsen

Awesome, thank you.

nb avatar Jun 02 '12 07:06 nb

The issue is back. I turned on logging in the trac.ini:

[logging]
log_file = trac.log
log_level = DEBUG
log_type = file

There is not that much of interest in the log though when I get the 404:

2012-06-04 12:26:07,770 Trac[main] DEBUG: Dispatching <Request "GET '/code-comments'">
2012-06-04 12:26:07,775 Trac[api] INFO: Synchronized '' repository in 0.00 seconds
2012-06-04 12:26:07,775 Trac[main] WARNING: HTTPNotFound: 404 Not Found (No handler matched request to /code-comments)

I'm not sure what that Synchronized '' repository is all about, but it's present when the /code-comments page returns the correct result as well, so I don't think it's relevant. Can I enable some more logging options to get some more relevant info?

christeredvartsen avatar Jun 04 '12 10:06 christeredvartsen

The synchronization item just means Trac looked at the repo for new commits.

Nothing in the logs usually means that there was an error and the plugin wasn't loaded at all.

Is there something in the log file from the time when trac was launched?

How is trac deployed? There must be some other log files, which might give us a clue (either apache, or tracd, or whatever server you use).

nb avatar Jun 04 '12 19:06 nb

We run Trac using mod_python (apache), and there is no info about this error in the regular apache error logs. The issue seems to go away when I restart apache, but after some days it returns, but not on every request.

Trac is installed via easy_install, and the code-browser egg is just dropped in the plugins directory of the Trac env.

christeredvartsen avatar Jun 04 '12 20:06 christeredvartsen