Modify

Opened 14 years ago

Closed 9 years ago

#8473 closed defect (wontfix)

Problem with Trac 0.12.2 and GitPlugin (BrowserModule)

Reported by: tss.soft@… Owned by: Herbert Valerio Riedel
Priority: normal Component: GitPlugin
Severity: major Keywords:
Cc: stuge Trac Release: 0.12

Description (last modified by Ryan J Ollos)

Today, I reinstalled Trac and GitPlugin and now I get the following warning:

Warning: Error with navigation contributor "BrowserModule" 

The Browse Source tab is missing. With Trac 0.12.2rc1 there was no Problem.

Attachments (0)

Change History (27)

comment:1 in reply to:  description ; Changed 14 years ago by anonymous

Replying to tss.soft@googlemail.com:

Today, I reinstalled Trac and GitPlugin and now I get the following warning: Warning: Error with navigation contributor "BrowserModule"

The "Browse source" tab is missing. With Trac 0.12.2rc1 there was no Problem.

same problem to me. Anybody know this solution?

comment:2 in reply to:  1 Changed 14 years ago by aksfkb@…

Replying to anonymous:

Replying to tss.soft@googlemail.com:

Today, I reinstalled Trac and GitPlugin and now I get the following warning: Warning: Error with navigation contributor "BrowserModule"

The "Browse source" tab is missing. With Trac 0.12.2rc1 there was no Problem.

same problem to me. Anybody know this solution?

This is on mine too, quick questions to narrow it down: how did you initialize your repos (bare or standard) and did you upgrade trac or start from fresh? (I have a bare and upgraded. This works fine without either on my test machine)

comment:3 Changed 14 years ago by FiX Kowalski

Summary: Problem with Trac 0.12.2 and BrowserModuleProblem with Trac 0.12.2 and GitPlugin (BrowserModule)

Same problem here. fresh trac-0.12 install (using egg), fresh gitplugin install (also using egg) on ubuntu maverick 64-bits. I am only using Git bare repositories. I have several Git repositories in my (unique) project.

This post contains a handful of error log message:

http://stackoverflow.com/questions/5183049/trouble-with-a-git-bare-repository-after-upgrading-trac-from-0-11-to-0-12

comment:4 Changed 14 years ago by Ryan J Ollos

Description: modified (diff)

comment:5 Changed 14 years ago by FiX Kowalski

I activated the logs: here are the results: it seems like Trac is complaining due to the lack of SVN configuration. This normal for me: I do not have an SVN repository here: only Git bare repos.

Log:

Mar 21 10:02:41 sisyphus Trac[env] INFO: -------------------------------- environment startup [Trac 0.12.2] --------------------------------
Mar 21 10:02:42 sisyphus Trac[env] WARNING: base_url option not set in configuration, generated links may be incorrect
Mar 21 10:02:42 sisyphus Trac[git_fs] INFO: detected GIT version 1.7.0.4
Mar 21 10:02:42 sisyphus Trac[svn_fs] INFO: Failed to load Subversion bindings
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.2-py2.6.egg/trac/versioncontrol/svn_fs.py", line 267, in __init__
    _import_svn()
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.2-py2.6.egg/trac/versioncontrol/svn_fs.py", line 68, in _import_svn
    from svn import fs, repos, core, delta
ImportError: No module named svn
Last edited 11 years ago by Jun Omae (previous) (diff)

comment:6 Changed 14 years ago by FiX Kowalski

Dis-regard my previous post about missing subversion bindings: this is a separated error on Ubuntu, which is resolved by installing the missing dependencies.

$  sudo apt-get install python-subversion
$  sudo service apache2 reload

The BrowserModule error remains, but there is nothing in the logs that provides more feedback.

comment:7 Changed 14 years ago by FiX Kowalski

Finally, purging any {{repository_*}}} from trac.ini and restarting Apache completely seems to have fixed my problem. no more BrowserModule-related warning message.

[trac]
- repository_dir =
- repository_sync_per_request = (default)
- repository_type = svn
+ repository_sync_per_request =
% sudo service apache2 restart

comment:8 Changed 14 years ago by aksfkb@…

We must have been working on two similar, but different problems: your solution doesn't work. We long since purged all of them and on adding *_sync_per_* nothing changes. We don't use apache either, instead we are on tracd still.

comment:9 Changed 14 years ago by anonymous

  • I've got the same issue if I setup myproject directory to:
    /srv/​git/myproject
    
  • But it works if I use the .git diretory:
    /srv/​git/​myproject/​.git
    
  • I can now browse source from both svn and git

comment:10 Changed 14 years ago by anonymous

The workaround is complete for those who need an intermediary:

http://stackoverflow.com/questions/5183049/trouble-with-a-git-bare-repository-after-upgrading-trac-from-0-11-to-0-12

Not a fix though.

comment:11 Changed 14 years ago by Yngve

Cc: Yngve added; anonymous removed

So, I am new to Trac and have almost no idea what I am doing, but I was wondering if you also get this error in the timeline?

Oops…
Trac detected an internal error:

TypeError: 'NoneType' object is not subscriptable

Looking at the back trace I noticed that git_fs.py is initializing a Repository with a None as the params dictionary, whereas the api.py expects the params dictionary to contain both name and id. Am I just using wrong version of the plugin/trac perhaps?

comment:12 Changed 14 years ago by Yngve

Cc: anonymous added; Yngve removed

I am quite embarrassed, I answered my own question while writing. Apparently I managed to use the plugin from the 0.11 branch, with trac 0.12.. I tried just now and the error messages have all disappeared. Sorry for the spam!

comment:13 in reply to:  12 Changed 14 years ago by Ryan J Ollos

Replying to eothred:

Apparently I managed to use the plugin from the 0.11 branch, with trac 0.12..

To avoid this possibility in the future, it might be useful to add a <0.12 or <0.12dev condition to the install_requires parameter in setup.py.

comment:14 Changed 13 years ago by ekampp@…

I still get this problem, and I have checked that I'm running both trac 0.12 and the appropriate plugin for git, but I still get the error: Warning: Error with navigation contributor "BrowserModule"

comment:15 in reply to:  9 ; Changed 13 years ago by Rob Guttman

Replying to anonymous:

  • I've got the same issue if I setup myproject directory to:
    /srv/​git/myproject
    
  • But it works if I use the .git diretory:
    /srv/​git/​myproject/​.git
    
  • I can now browse source from both svn and git

This worked for me as well. Thank you!

comment:16 Changed 13 years ago by anonymous

Didn't work for me. I had bare git repositories anyway - i.e. ../myproject.git. Anyone have a clue how to support multiple (bare) git repositories with Trac v0.12.2?

comment:17 Changed 13 years ago by trac@…

Priority: normalhigh
Severity: majorcritical

I'm having the same problem, on normal checkouts of the remote repository, the ".git" directory of the remote checkout, and bare (mirror) repositories cloned from the remote checkout. It makes the plugin impossible to use, therefore raising severity...

comment:18 Changed 13 years ago by trac@…

Priority: highnormal
Severity: criticalmajor

Actually, my problem was again related to trac 0.12 and an older trac-git, both from Debian Wheezy. Commented on this Debian bug which describes the problem: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634826

comment:19 Changed 13 years ago by sven@…

same problem on openSUSE 11.3 and 11.4.

Tack-Hacks ticket#8682 provides a working patch: http://trac-hacks.org/ticket/8682 -> maybe merge these tickets?

openSUSE-Ticket: https://bugzilla.novell.com/show_bug.cgi?id=697156

Please implement.

comment:20 Changed 13 years ago by thucdat@…

I run trac 0.12 on windows 7, the timeline tab shows changes I made to the git repository, but when I click on the browser tab, I got:

Trac detected an internal error:

WindowsError: (5, 'Access is denied')

There was an internal error in Trac. It is recommended that you notify your local Trac administrator with the information needed to reproduce the issue.

To that end, you could a ticket.

The action that triggered the error was:

GET: /browser

comment:21 Changed 12 years ago by anonymous

Hey, just in case anyone is still having this problem and nothing else is working I needed a different solution that most people.

I am using Track and the Git plugin, and my git repos are hosted on the same server as trac, but I use gitosis.

After reading through some source code and the debug logs the solution is stupid simple.

For me the git control files were not visible to the user that is running trac (www-data). Or rather the directories that contain the files were not executable.

To fix this you need to change into the directory of your gitosis user (lets assume /home/git) then:

cd /home/git/repositories sudo chmod 755 testRepository.git

where testRepository.git is the repos that you want in trac. Optionally you can of course just use * instead of a repository name.

Hopefully this is of some help to someone!

Cheers!

comment:22 Changed 12 years ago by stuge

Cc: stuge added; anonymous removed

comment:23 in reply to:  15 ; Changed 11 years ago by whatrevolution@…

Replying to robguttman:

Replying to anonymous:

  • I've got the same issue if I setup myproject directory to:
    /srv/​git/myproject
    
  • But it works if I use the .git diretory:
    /srv/​git/​myproject/​.git
    
  • I can now browse source from both svn and git

This worked for me as well. Thank you!

Confirmed again that this is a solution in some cases. Standard git repo (not bare) requires that Trac is pointed at the repository database (.git directory), and not the user working directory from which that was made.

comment:24 in reply to:  23 ; Changed 11 years ago by whatrevolution@…

Replying to whatrevolution@…:

Replying to robguttman:

Replying to anonymous:

  • I've got the same issue if I setup myproject directory to:
    /srv/​git/myproject
    
  • But it works if I use the .git diretory:
    /srv/​git/​myproject/​.git
    
  • I can now browse source from both svn and git

This worked for me as well. Thank you!

Confirmed again that this is a solution in some cases. Standard git repo (not bare) requires that Trac is pointed at the repository database (.git directory), and not the user working directory from which that was made.

However, a follow-up thought: Shouldn't the BrowserModule (or earlier in the Trac stack, maybe up-stream) be noticing that the user has erred, and is pointing the BrowseModule and Trac at a non-git directory? There, I think, lies a real defect.

comment:25 in reply to:  24 ; Changed 11 years ago by whatrevolution@…

Replying to whatrevolution@…:

Replying to whatrevolution@…:

Replying to robguttman:

Replying to anonymous:

  • I've got the same issue if I setup myproject directory to:
    /srv/​git/myproject
    
  • But it works if I use the .git diretory:
    /srv/​git/​myproject/​.git
    
  • I can now browse source from both svn and git

This worked for me as well. Thank you!

Confirmed again that this is a solution in some cases. Standard git repo (not bare) requires that Trac is pointed at the repository database (.git directory), and not the user working directory from which that was made.

However, a follow-up thought: Shouldn't the BrowserModule (or earlier in the Trac stack, maybe up-stream) be noticing that the user has erred, and is pointing the BrowseModule and Trac at a non-git directory? There, I think, lies a real defect.

This information is already in TracGit troubleshooting: http://trac.edgewall.org/wiki/TracGit#Troubleshooting

We just need the error message to be made more informative.

comment:26 in reply to:  25 Changed 11 years ago by Ryan J Ollos

Replying to whatrevolution@…:

Replying to whatrevolution@…:

Replying to whatrevolution@…:

Replying to robguttman:

Replying to anonymous:

  • I've got the same issue if I setup myproject directory to:
    /srv/​git/myproject
    
  • But it works if I use the .git diretory:
    /srv/​git/​myproject/​.git
    
  • I can now browse source from both svn and git

This worked for me as well. Thank you!

Confirmed again that this is a solution in some cases. Standard git repo (not bare) requires that Trac is pointed at the repository database (.git directory), and not the user working directory from which that was made.

However, a follow-up thought: Shouldn't the BrowserModule (or earlier in the Trac stack, maybe up-stream) be noticing that the user has erred, and is pointing the BrowseModule and Trac at a non-git directory? There, I think, lies a real defect.

This information is already in TracGit troubleshooting: http://trac.edgewall.org/wiki/TracGit#Troubleshooting

We just need the error message to be made more informative.

The version of the plugin on trac-hacks isn't being maintained, but the plugin has been integrated into Trac as of version 1.0, and is being maintained there. trac:#11297 should address the issue you describe.

comment:27 Changed 9 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

GitPlugin is deprecated. Please upgrade to Trac 1.0 and use TracGit.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Herbert Valerio Riedel.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.