Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3913 by Update to RBTools 0.7.4, scripts to interface with reviewboard now error.

*** You must complete this form in its entirety, or your bug report will be
*** rejected.
*** If you have a security issue to report, please send it confidentially
*** Posting security-related issues to this bug
*** tracker causes us to have to do an emergency release.
*** For customer support, please post to
*** If you have a patch, please submit it to
*** This bug tracker is public. Please check that any logs or other
*** that you include has been stripped of confidential information.

What version are you running?
RBTools 0.7.4 (CentOS package RBTools-0.7.4-1.el7.noarch)

What's the URL of the page containing the problem?

What steps will reproduce the problem?
1. post a review to reviewboard explicitly indicating --username and --password.

What is the expected output? What do you see instead?
I expected the post to execute error free so no output. Instead I see:
ERROR: Unexpected API Error: You are not logged in (HTTP 401, API Error 103)

What operating system are you using? What browser?
CentOS for RBTools, Windows/Centos with Mozilla or IE for dashboard access.

Please provide any additional information below.

I posted this information on the reviewboard support fourm:!topic/reviewboard/B5SJadJr7WM

Here are the details again:


I have been using Review Board version 1.7.16 with great success. I had been using Centos 7 with RBTools 0.7.2 (package RBTools-0.7.2-1.el7.noarch).

I recently updated the Centos 7 install and RBTool was updated to version 0.7.4 (package RBTools-0.7.4-1.el7.noarch).

I use a canned script which posts reviews to a remote server running reviewboard 1.7.16.

The error that I am getting is:

ERROR: Unexpected API Error: You are not logged in (HTTP 401, API Error 103)

The problem with this message is that I know that I am logged in.

This is the script that I run on 0.7.2 which has worked flawlessly. Unfortunately I can't share it all but this is the snippet that runs the rbt stuff.

# Use RBTools if available
if (system(qq(rbt --version 2>/dev/null)) == 0)
    # Posting Options:
    my $rbt_options = qq( --publish) unless ( $draft );

    # Review Board Server Options:
    $rbt_options   .= qq( --server "https://{URL Removed, sorry}");
    $rbt_options   .= qq( --username "$username");
    $rbt_options   .= qq( --password "$password");

    # Repository Options:
    $rbt_options   .= qq( --repository "$repository");

    # Review Request Field Options:
    $rbt_options   .= qq( --summary "$title");
$rbt_options .= qq( --description "$description") unless (-f "$description"); $rbt_options .= qq( --description-file "$description") if (-f "$description");
    $rbt_options   .= qq( --testing-done "$testing") unless (-f "$testing");
$rbt_options .= qq( --testing-done-file "$testing") if (-f "$testing");
    $rbt_options   .= qq( --branch "$branch");
    $rbt_options   .= qq( --target-groups "$reviewer_groups");
    $rbt_options   .= qq( --target-people "$reviewers");

    # Diff Generation Options:
    $rbt_options   .= qq( --diff-filename "$diffFile");

    # Create a new review request
    my $output = qx(rbt post $rbt_options);
    my $result = ($? >> 8);
    if ($result == 0)
        (my $url) = $output =~ /(.*\/diff\/)/;
        print "\nYou can watch your review at ".$url."\n\n";

        system("rm -f $diffFile $stdErr");

    exit $result;

If I run the rbt command manually with debug on I see the same issue so I know that the script isn't the problem.

~/ws/myproject/code > /usr/bin/rbt post --debug --server ""; --username "jstobern" --password "<removed>" --repository "<removed>" --summary "Test cmdline" --branch HEAD --diff-filename review.diff
RBTools 0.7.4
Python 2.7.5 (default, Jun 24 2015, 00:41:19)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]
Running on Linux-3.10.0-229.7.2.el7.x86_64-x86_64-with-centos-7.1.1503-Core
Home = /home/jstobern
Current directory = /home/jstobern/ws/myproject/code
Running: git version
Checking for a Subversion repository...
Running: svn --non-interactive info
Command exited with rc 1: ['svn', '--non-interactive', u'info']
svn: E155007: '/home/jstobern/ws/myproject/code' is not a working copy
Checking for a Git repository...
Running: git rev-parse --git-dir
Command exited with rc 128: ['git', 'rev-parse', '--git-dir']
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Checking for a Mercurial repository...
Unable to execute "hg --help": skipping Mercurial
Checking for a CVS repository...
repository info: Path:, Base path: None, Supports changesets: False
Making HTTP GET request to
Got API Error 103 (HTTP code 401): You are not logged in
Error data: {u'stat': u'fail', u'err': {u'msg': u'You are not logged in', u'code': 103}}
Traceback (most recent call last):
  File "/usr/bin/rbt", line 9, in <module>
    load_entry_point('RBTools==0.7.4', 'console_scripts', 'rbt')()
File "/usr/lib/python2.7/site-packages/rbtools/commands/", line 133, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
File "/usr/lib/python2.7/site-packages/rbtools/commands/", line 612, in run_from_argv
    exit_code = self.main(*args) or 0
File "/usr/lib/python2.7/site-packages/rbtools/commands/", line 643, in main
    api_client, api_root = self.get_api(server_url)
File "/usr/lib/python2.7/site-packages/rbtools/commands/", line 768, in get_api
    raise CommandError('Unexpected API Error: %s' % e)
rbtools.commands.CommandError: Unexpected API Error: You are not logged in (HTTP 401, API Error 103)
~/ws/myproject/code >

I noticed that if I REMOVE the --username option. The rbt command (and hence the script) works correctly. I'm assuming that is because it falls back to using the data in the .rbtools-cookies. This is not how I intended this script to work because the username and password are derived by my script that then passed to rbt via --username and --password.

Is it possible to get the functionality to the way it worked in 0.7.2? Passwords change often in our environment so the ability to use the script to derive the password from other system files was very convenient.

I am wondering if the updates to Bug 3858 might have created this change in behaviour.


You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:

You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
For more options, visit

Reply via email to