Hi Sara, We minify our files by default, making the context less than useful. If you’re using Chrome, you should be able to click the error, see that big minified file, and then click the little “{}” at the bottom of the window. That will un-minify it, updating the error in the console to point to the actual line where things failed. If you could then paste that line (and the lines surrounding it), that will help narrow things down.
We are getting ready for Review Board 2.0.7, which will display more useful errors in the New Review Request page when things go wrong. Hopefully it will help with this case as well. It would also be helpful to see the request/response payloads invoked by that page, in order to see where things went wrong. I’d expect one of the responses will be a HTTP 500. Christian -- Christian Hammond - christ...@beanbaginc.com Review Board - https://www.reviewboard.org Beanbag, Inc. - https://www.beanbaginc.com On September 9, 2014 at 2:04:22 PM, Sara Rayburn (sararayb...@gmail.com) wrote: > I am having a similar problem after upgrading to 2.0.6. I do see an error > in my console for url http://reviewboard.cctechnol.com/r/new/. The error > happens after I select a file from browse and try to upload. > > TypeError: rsp is null > > with the following details: > > (function(){RB.PostCommitModel=Backbone.Model.extend({defaults:{repository:null,branch:null}});RB.PreCommitModel=Backbone.Model.extend({defaults:{basedir:null,changeNumber:null,diffFile:null,diffValid:false,error:null,parentDiffFile:null,repository:null,state:0},State:{PROMPT_FOR_DIFF:0,PROMPT_FOR_BASEDIR:1,PROPMT_FOR_CHANGE_NUMBER:2,PROCESSING_DIFF:3,UPLOADING:4,PROMPT_FOR_PARENT_DIFF:5,ERROR:6},initialize:function(){_super(this).initialize.apply(this,arguments);this.on("change:diffFile > > change:parentDiffFile change:basedir "+"change:changeNumber > change:diffValid",this._updateState,this)},startOver:function(){this.set({basedir:null,changeNumber:null,diffFile:null,diffValid:false,error:null,parentDiffFile:null,state:this.State.PROMPT_FOR_DIFF})},_updateState:function(){var > > basedir=this.get("basedir"),changeNumber=this.get("changeNumber"),diff=this.get("diffFile"),diffValid=this.get("diffValid"),parentDiff=this.get("parentDiffFile"),repository=this.get("repository"),requiresBasedir=repository.get("requiresBasedir"),requiresChangeNumber=repository.get("requiresChangeNumber"),state=this.get("state");switch(state){case > > this.State.PROMPT_FOR_DIFF:if(diff){if(requiresBasedir&&!basedir){this.set("state",this.State.PROMPT_FOR_BASEDIR)}else > > if(requiresChangeNumber&&!changeNumber){this.set("state",this.State.PROMPT_FOR_CHANGE_NUMBER)}else{this.set("state",this.State.PROCESSING_DIFF);this._tryValidate()}}break;case > > this.State.PROMPT_FOR_PARENT_DIFF:if(diff&&parentDiff){this.set("state",this.State.PROCESSING_DIFF);this._tryValidate()}break;case > > this.State.PROMPT_FOR_BASEDIR:console.assert(diff,"cannot be in basedir > prompt > state without a > diff");if(basedir){if(requiresChangeNumber&&!changeNumber){this.set("state",this.State.PROMPT_FOR_CHANGE_NUMBER)}else{this.set("state",this.State.PROCESSING_DIFF);this._tryValidate()}}break;case > > this.State.PROMPT_FOR_CHANGE_NUMBER:console.assert(diff,"cannot be in > changenum > prompt state without a > diff");if(changeNumber){this.set("state",this.State.PROCESSING_DIFF);this._tryValidate()}break;case > > this.State.PROCESSING_DIFF:if(diffValid){this.set("state",this.State.UPLOADING);this._createReviewRequest()}break;case > > this.State.UPLOADING:break;case > this.State.ERROR:break}},_tryValidate:function(){var > diff=this.get("diffFile"),parentDiff=this.get("parentDiffFile"),repository=this.get("repository"),uploader=new > > RB.ValidateDiffModel;this.set("diffValid",false);console.assert(diff);uploader.set({repository:repository.get("id"),localSitePrefix:repository.get("localSitePrefix"),basedir:this.get("basedir"),diff:diff,parentDiff:parentDiff});uploader.save({success:_.bind(this._onValidateSuccess,this),error:_.bind(this._onValidateError,this)})},_onValidateSuccess:function(){this.set("diffValid",true)},_onValidateError:function(model,xhr){var > > rsp=$.parseJSON(xhr.responseText),newState=this.State.ERROR,error;switch(rsp.err.code){case > > RB.APIErrors.REPO_FILE_NOT_FOUND:if(this.get("repository").get("scmtoolName")==="Git"&&rsp.revision.length!==40){error=gettext("The > > uploaded diff uses short revisions, but Review Board requires full revisions. Please > generate a new diff using the --full-index > parameter.")}else{error=interpolate(gettext('The > file "%s" (revision %s) was not found in the > repository.'),[rsp.file,rsp.revision]);if(this.get("parentDiffFile")===null){newState=this.State.PROMPT_FOR_PARENT_DIFF}}break;case > > RB.APIErrors.DIFF_PARSE_ERROR:error=rsp.err.msg+" "+"Line "+rsp.linenum+": > "+rsp.reason;break;default:error=rsp.err.msg;break}if(error){this.set({state:newState,error:error})}},_createReviewRequest:function(){var > > repository=this.get("repository"),reviewRequest=new > RB.ReviewRequest({commitID:this.get("changeNumber"),localSitePrefix:repository.get("localSitePrefix"),repository:repository.get("id")});reviewRequest.save({success:function(){var > > diff=reviewRequest.createDiff();diff.set({basedir:this.get("basedir"),diff:this.get("diffFile"),parentDiff:this.get("parentDiffFile")});diff.url=reviewRequest.get("links").diffs.href;diff.save({success:function(){window.location=reviewRequest.get("reviewURL")},error:this._onValidateError},this)},error:this._onValidateError},this)}});RB.NewReviewRequest=Backbone.Model.extend({defaults:{repositories:[]}});RB.CollectionView=Backbone.View.extend({itemViewType:null,initialize:function(options){var > > collection=options.collection;this.collection=collection;this.views=[];collection.each(this._add,this);collection.on({add:this._add,remove:this._remove},this)},render:function(){this._rendered=true;this.$el.empty();_.each(this.views,function(view){this.$el.append(view.render().el)},this);return > > this},_add:function(item){var > view;console.assert(this.itemViewType,"itemViewType > must be defined by the subclass");view=new > this.itemViewType({model:item});this.views.push(view);if(this._rendered){this.$el.append(view.render().el)}},_remove:function(item){var > > grouped=_.groupBy(this.views,function(view){return > view.model===item?"toRemove":"toKeep"});this.views=grouped.toKeep||[];if(this._rendered){_.each(grouped.toRemove,function(view){view.remove()})}}});RB.BranchView=Backbone.View.extend({tagName:"option",render:function(){this.$el.text(this.model.get("name")).attr("selected",this.model.get("isDefault"));return > > this}});RB.BranchesView=RB.CollectionView.extend({tagName:"select",itemViewType:RB.BranchView,events:{change:"_onChange"},render:function(){_super(this).render.apply(this,arguments);this.collection.each(function(branch){if(branch.get("isDefault")){this.trigger("selected",branch)}},this);return > > this},_add:function(branch){_super(this)._add.apply(this,arguments);if(this._rendered&&branch.get("isDefault")){this.trigger("selected",branch)}},_onChange:function(){var > > selectedIx=this.$el.prop("selectedIndex");this.trigger("selected",this.collection.models[selectedIx])}});RB.CommitView=Backbone.View.extend({className:"commit",template:_.template([' > class="progress"> ',' '," <%- summary %>"," <% if (reviewRequestURL) > { %>",' '," <% } %>"," "," <%= > details %> "].join("")),events:{click:"_onClick"},render:function(){var > commitID=this.model.get("id");if(commitID.length===40){commitID=commitID.slice(0,7)}this.$el.html(this.template(_.defaults({details:interpolate(gettext('Revision > > %(revision)s by %(author)s, > > datetime="%(date)s">.'),{revision:_.escape(commitID),author:_.escape(this.model.get("authorName")),date:this.model.get("date").toISOString()},true)},this.model.attributes)));this.$(".timesince").timesince();return > > this},_onClick:function(){var > url=this.model.get("reviewRequestURL");if(url){window.location=url}else{this.model.trigger("create",this.model)}},showProgress:function(){this.$(".progress").show()},cancelProgress:function(){this.$(".progress").hide()}});RB.CommitsView=RB.CollectionView.extend({className:"commits",itemViewType:RB.CommitView,render:function(){_super(this).render.call(this);$("#new-review-request > > .main").scroll(_.bind(this._onScroll,this));return > this},setPending:function(commit){_.each(this.views,function(view){if(view.model===commit){view.showProgress()}else{view.cancelProgress()}})},cancelPending:function(){_.each(this.views,function(view){view.cancelProgress()})},_onScroll:function(ev){var > > scrollThresholdPx=50;if(ev.target.scrollTop+ev.target.offsetHeight>ev.target.scrollHeight-scrollThresholdPx){this.collection.fetchNext()}}});RB.RepositoryView=Backbone.View.extend({className:"repository",template:_.template([" <%- > name %> "].join("")),events:{click:"_onClick"},render:function(){this.$el.html(this.template(this.model.attributes));this.lowerName=this.model.get("name").toLowerCase();return > this},_onClick:function(){this.model.trigger("selected",this.model)}});RB.RepositorySelectionView=RB.CollectionView.extend({className:"repository-selector",itemViewType:RB.RepositoryView,events:{"click > > .repository-search-icon":"_onSearchClicked","input > .repository-search":"_onSearchChanged"},initialize:function(){_super(this).initialize.apply(this,arguments);this._selected=null;this._searchActive=false;this.listenTo(this.collection,"selected",this._onRepositorySelected)},render:function(){_super(this).render.apply(this,arguments);this._$header=$(" ").text(gettext("Repositories")).prependTo(this.$el);this._$searchIconWrapper=$(" ").addClass("search-icon-wrapper").prependTo(this.$el);this._$searchIcon=$(" ").addClass("rb-icon > rb-icon-search > repository-search-icon").prependTo(this._$searchIconWrapper);this._$searchBox=$("").addClass("repository-search").prependTo(this.$el);this._iconOffset=this.$el.innerWidth()-this._$searchIcon.outerWidth(true);this._$searchIconWrapper.css("left",this._iconOffset);return > > this},_onRepositorySelected:function(item){this._selected=item;_.each(this.views,function(view){if(view.model===item){view.$el.addClass("selected")}else{view.$el.removeClass("selected")}});this.trigger("selected",item)},_onSearchClicked:function(){var > > parentWidth=this.$el.innerWidth(),$searchBox=this._$searchBox,searchBoxRightEdge=$searchBox.position().left+$searchBox.outerWidth(),searchBoxRightMargin=parentWidth-searchBoxRightEdge,animationSpeedMS=200;this._searchActive=!this._searchActive;if(this._searchActive){this._$searchIconWrapper.animate({left:"0px"},animationSpeedMS);this._$searchBox.css("visibility","visible").animate({width:this._iconOffset-searchBoxRightMargin*2},{duration:animationSpeedMS,complete:function(){$searchBox.focus()}});this._$header.animate({width:0},animationSpeedMS)}else{this._$header.animate({width:"100%"},animationSpeedMS);this._$searchIconWrapper.animate({left:this._iconOffset},animationSpeedMS);this._$searchBox.animate({width:0},{duration:animationSpeedMS,complete:function(){$searchBox.css("visibility","hidden")}})}},_onSearchChanged:function(){var > > searchTerm=this._$searchBox.val().toLowerCase();_.each(this.views,function(view){view.$el.setVisible(view.lowerName.indexOf(searchTerm)!==-1)})}});RB.PostCommitView=Backbone.View.extend({className:"post-commit",initialize:function(){var > > model=this.model,repository=model.get("repository"),branches=repository.branches;if(!branches.loaded){branches.fetch({success:function(){branches.loaded=true}})}this._branchesView=new > > RB.BranchesView({collection:branches});this._branchesView.on("selected",function(branch){model.set("branch",branch)},this);this.listenTo(model,"change:branch",this._onBranchChanged)},render:function(){var > > $branch=$(" ").addClass("branches section-header");this._rendered=true;$branch.append(gettext("New > Review Request for Committed > Change:")).append(this._branchesView.render().el).appendTo(this.$el);if(this._commitsView){this.$el.append(this._commitsView.render().el)}return > > this},_onBranchChanged:function(model,branch){if(this._commitsView){this.stopListening(this._commitsCollection);this._commitsView.remove()}this._commitsCollection=this.model.get("repository").getCommits({branch:branch.id});this._commitsCollection.fetch();this.listenTo(this._commitsCollection,"create",this._onCreateReviewRequest);this._commitsView=new > > RB.CommitsView({collection:this._commitsCollection});if(this._rendered){this.$el.append(this._commitsView.render().el)}},_onCreateReviewRequest:function(commit){var > > repository=this.model.get("repository"),reviewRequest;if(this._createPending){return}this._createPending=true;this._commitsView.setPending(commit);reviewRequest=new > > RB.ReviewRequest({repository:repository.id,localSitePrefix:repository.get("localSitePrefix")});reviewRequest.createFromCommit({commitID:commit.id,success:function(){window.location=reviewRequest.get("reviewURL")},error:function(model,xhr){this._commitsView.setPending(null);this._createPending=false;alert(xhr.errorText)}},this)}});RB.PreCommitView=Backbone.View.extend({className:"pre-commit",template:_.template([' > class="section-header"><%- pendingChangeHeader %> ',' '," > <%- tipHeader %>"," <%= tip %>"," ",' > id="prompt-for-diff">'," "," <%= selectDiff %>"," "," ",' > class="input dnd" id="prompt-for-parent-diff">'," ",' > />'," <%= selectParentDiff %>"," ",' <%- startOver > %>'," ",' ',' '," > <%- baseDir %>",' ',' '," ",' <%- startOver %>'," ",' > class="input" id="prompt-for-change-number">',' '," > <%- changeNum %>",' ',' > type="submit" value="<%- ok %>" />'," ",' <%- > startOver %>'," ",' ',' > class="input" id="uploading-diffs"> ',' ',' > ',' <%- startOver %>'," "].join("")),events:{"dragenter > .dnd":"_onDragEnter","dragover .dnd":"_onDragOver","dragleave > .dnd":"_onDragLeave","drop > .dnd":"_onDrop","submit #basedir-form":"_onBasedirSubmit","submit > #changenum-form":"_onChangenumSubmit","click > .startover":"_onStartOverClicked","click > #select-diff-file":"_onSelectFileClicked","click > #select-parent-diff-file":"_onSelectFileClicked"},initialize:function(){this.listenTo(this.model,"change:state",this._onStateChanged);this.listenTo(this.model,"change:error",this._onErrorChanged)},render:function(){var > > self=this;this.$el.html(this.template({pendingChangeHeader:gettext("New > Review Request for Pending Change"),tipHeader:gettext("Tip:"),tip:gettext('We > > recommend using rbt post from RBTools > to create and update review requests.'),selectDiff:gettext('> > id="select-diff-file" value="Select"> or drag and drop a diff file to > begin.'),selectParentDiff:gettext('> type="button" > id="select-parent-diff-file" value="Select"> or drag and drop a parent > diff file if you have one.'),baseDir:gettext("What is the base directory for > this diff?"),changeNum:gettext("What > is the change number for this diff?"),startOver:gettext("Start > Over"),ok:gettext("OK")}));this._$fileInput=$('> type="file" > />').hide().appendTo(this.$el).change(function(){self._handleFiles(self._$fileInput.get(0).files)});this._$promptForDiff=this.$("#prompt-for-diff");this._$promptForParentDiff=this.$("#prompt-for-parent-diff");this._$promptForBasedir=this.$("#prompt-for-basedir");this._$promptForChangeNumber=this.$("#prompt-for-change-number");this._$processingDiff=this.$("#processing-diff");this._$uploading=this.$("#uploading-diffs");this._$error=this.$("#error-indicator");this._$errorContents=this.$("#error-contents");this._$diffRevisionError=this.$("#parent-diff-error-contents");this._onStateChanged(this.model,this.model.get("state"));return > > this},_onErrorChanged:function(model,error){var errorHTML=' '+error,innerHeight,outerHeight;this._$errorContents.html(errorHTML);this._$diffRevisionError.html(errorHTML);innerHeight=this._$errorContents.height();outerHeight=this._$error.height();this._$errorContents.css({top:Math.floor((outerHeight-innerHeight)/2)+"px"})},_onStateChanged:function(model,state){this._$promptForDiff.setVisible(state===this.model.State.PROMPT_FOR_DIFF);this._$promptForParentDiff.setVisible(state===this.model.State.PROMPT_FOR_PARENT_DIFF);this._$promptForBasedir.setVisible(state===this.model.State.PROMPT_FOR_BASEDIR);this._$processingDiff.setVisible(state===this.model.State.PROCESSING_DIFF);this._$promptForChangeNumber.setVisible(state===this.model.State.PROMPT_FOR_CHANGE_NUMBER);this._$uploading.setVisible(state===this.model.State.UPLOADING);this._$error.setVisible(state===this.model.State.ERROR)},_onDragEnter:function(event){event.stopPropagation();event.preventDefault();this.$(".dnd").addClass("drag-hover");return > false},_onDragOver:function(event){var > dt=event.originalEvent.dataTransfer;event.stopPropagation();event.preventDefault();if(dt){dt.dropEffect="copy"}return > > false},_onDragLeave:function(event){var > dt=event.originalEvent.dataTransfer;event.stopPropagation();event.preventDefault();this.$(".dnd").removeClass("drag-hover");if(dt){dt.dropEffect="none"}return > > false},_onDrop:function(event){var > dt=event.originalEvent.dataTransfer,files=dt&&dt.files;event.stopPropagation();event.preventDefault();if(files){this._handleFiles(files)}},_handleFiles:function(files){switch(this.model.get("state")){case > > this.model.State.PROMPT_FOR_DIFF:this.model.set("diffFile",files[0]);break;case > > this.model.State.PROMPT_FOR_PARENT_DIFF:this.model.set("parentDiffFile",files[0]);break;default:console.assert("File > > received in wrong state")}},_onBasedirSubmit:function(){var > basedir=this.$("#basedir-input").val();if(basedir){this.model.set("basedir",basedir)}return > > false},_onChangenumSubmit:function(){var > changenum=this.$("#changenum-input").val();if(changenum){this.model.set("changeNumber",changenum)}return > > false},_onStartOverClicked:function(){var > input=this._$fileInput.clone(true);this._$fileInput.replaceWith(input);this._$fileInput=input;this.model.startOver();return > > false},_onSelectFileClicked:function(){this._$fileInput.click()}});(function(){var > > FilesOnlyPreCommitModel,FilesOnlyPreCommitView;FilesOnlyPreCommitModel=Backbone.Model.extend({defaults:_.defaults({repository:null})});FilesOnlyPreCommitView=Backbone.View.extend({className:"files-only",template:_.template([" <%- > description %> "," ",'> value="<%- buttonText %>" />'].join("")),events:{"click #files-only-create":"_onCreateClicked"},render:function(){this.$el.html(this.template({description:gettext("You > won't be able to add any diffs to this review request. The review request > will only be usable > for reviewing graphics, screenshots and file > attachments."),buttonText:gettext("Create > Review Request")}));return this},_onCreateClicked:function(){var > repository=this.model.get("repository"),reviewRequest=new > RB.ReviewRequest({localSitePrefix:repository.get("localSitePrefix")});reviewRequest.save({success:function(){window.location=reviewRequest.get("reviewURL")},error:function(){}});return > > false}});RB.NewReviewRequestView=Backbone.View.extend({el:"#new-review-request",template:_.template([' > class="sidebar"> ',' ',' <%- hint %> '," "].join("")),initialize:function(){this._repositorySelectionView=new > RB.RepositorySelectionView({collection:this.model.get("repositories")});this.listenTo(this._repositorySelectionView,"selected",this._onRepositorySelected);$(window).resize(_.bind(this._onResize,this))},render:function(){var > > repositories=this.model.get("repositories").models;this._rendered=true;this.$el.html(this.template({hint:gettext("Select > > a > repository")}));this._$sidebar=this.$(".sidebar");this._$content=this.$(".main");this._$hint=this.$(".hint");this._$sidebar.append(this._repositorySelectionView.el);this._repositorySelectionView.render();if(this._preCommitView){this._$hint.hide();this._$content.append(this._preCommitView.render().el)}if(this._postCommitView){this._$hint.hide();this._$content.append(this._postCommitView.render().el)}this.$el.show();this._onResize();if(repositories.length===2){repositories[1].trigger("selected",repositories[1])}return > > this},_onResize:function(){var > $window,windowWidth,windowHeight,elTop,height;if(this._rendered){$window=$(window);windowWidth=$window.width();windowHeight=$window.height();elTop=this.$el.offset().top;height=windowHeight-elTop-14+"px";this.$el.height(height);this.$(".repository-selector, > > .main").height(height);this.$(".hint").css({height:height,"line-height":height})}},_onRepositorySelected:function(repository){if(this._preCommitView){this._preCommitView.remove();this._preCommitView=null}if(this._postCommitView){this._postCommitView.remove();this._postCommitView=null}this.model.set("repository",repository);if(repository.get("filesOnly")){this._preCommitView=new > > FilesOnlyPreCommitView({model:new > FilesOnlyPreCommitModel({repository:repository})})}else{this._preCommitView=new > > RB.PreCommitView({model:new > RB.PreCommitModel({repository:repository})});if(repository.get("supportsPostCommit")){this._postCommitView=new > > RB.PostCommitView({model:new > RB.PostCommitModel({repository:repository})})}}if(this._rendered){this._$hint.hide();this._$content.append(this._preCommitView.render().el);if(this._postCommitView){this._$content.append(this._postCommitView.render().el)}}}})})()}).call(this); > > > > Like the other poster, I've narrowed it down to just a couple of files that > are breaking things, but they don't seem to have any unusual content. > > Sara > > > On Thursday, September 4, 2014 12:52:18 AM UTC-5, koval...@gmail.com wrote: > > > > Yes, I use some extentions in Firifox, but with turned off extentions > > situation is the same. > > I don't have proxy. Reviewboard is installed on local computer, it's url > > is http://localhost:8090/reviewboard. > > > > -- > Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/ > --- > Sign up for Review Board hosting at RBCommons: https://rbcommons.com/ > --- > Happy user? Let us know at http://www.reviewboard.org/users/ > --- > You received this message because you are subscribed to the Google Groups > "reviewboard" > group. > To unsubscribe from this group and stop receiving emails from it, send an > email to reviewboard+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/ --- Sign up for Review Board hosting at RBCommons: https://rbcommons.com/ --- Happy user? Let us know at http://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups "reviewboard" group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.