Details
-
Bug
-
Resolution: Duplicate
-
Low
-
None
-
4.6.1, 4.6.2
-
None
Description
Summary
If a new file is created and added in the same commit where a merge conflict is being resolved, that new file will fail to open in the browser. Attempting to open the file returns a 500 error to the user, and generates a NullPointerException in the logs.
Steps to Reproduce
- Attempt to merge a branch on the command line that will generate a merge conflict.
- Create a new file.
- git add the file(s) containing conflicts to resolve the conflict.
- git add the new file.
- Commit the changes.
- Push the changes.
- Navigate to the repository in the browser, and open the newly created file.
Expected Results
The contents of the file are displayed.
Actual Results
The user receives a 500 error in the browser.
The below exception is thrown in the atlassian-bitbucket.log file:
2016-05-31 15:32:19,930 WARN [http-nio-7990-exec-7] smaruvada @3H8VA8x932x688x0 10mi4n 192.168.10.1 "GET /projects/META/repos/puppets/browse/crash2 HTTP/1.1" c.a.s.i.w.s.f.AvatarUrlFunction Error getting avatar URL for null java.lang.NullPointerException: person at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:226) ~[guava-18.0.jar:na] at com.atlassian.stash.internal.avatar.ConfigurableAvatarService.getUrlForPerson(ConfigurableAvatarService.java:199) ~[bitbucket-service-impl-4.6.1.jar:na] at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) ~[atlassian-plugins-core-4.1.8.jar:na] at com.atlassian.stash.internal.web.soy.functions.AvatarUrlFunction.getUrl(AvatarUrlFunction.java:80) [classes/:na] at com.atlassian.stash.internal.web.soy.functions.AvatarUrlFunction.apply(AvatarUrlFunction.java:67) [classes/:na] at com.atlassian.stash.internal.web.soy.functions.AvatarUrlFunction.apply(AvatarUrlFunction.java:23) [classes/:na] at com.atlassian.soy.impl.modules.SoyJavaFunctionAdapter.computeForJava(SoyJavaFunctionAdapter.java:34) [soy-template-plugin-4.3.0.jar:na]
Notes
This case was tested by multiple customers in version 4.3.2, and the issue did not exist.
Workaround
- Commit new files in a separate commit from the merge commit. One customer has merge commits already imported from a forked repository, however, and cannot use this workaround.
- Create a new commit for all the files that are inaccessible. The files will be accessible after pushing this commit.
Attachments
Issue Links
- duplicates
-
BSERV-8673 Error when viewing a file that was created in a merge
- Closed