Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

"An error occurred" when attempting to view source file - Error HZ-GB-2312

Bill McGowan May 20, 2018

Hi All,

 

I have run into an error which occurs in my instance of Bitbucket Server when attempting to browse particular source files in the Source section of Bitbucket Server.

The error I receive is like so:

 

 error.PNG

 

I believe I have found the possible cause of the error. All of the files I have found which trigger this error contain "~{" somewhere in the text of the file.

I tried googling around for that error code but there were no results relevant to this particular issue.

Has any body else experienced this and/or have any advice on if this is indeed the cause and how to resolve?

 

Thanks,

Bill

1 answer

1 accepted

1 vote
Answer accepted
Rodrigo M
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 22, 2018

Hello Bill

Did you try to restart Bitbucket Server to see if the issue still occurs?

If the problem persists, I'd suggest:

  • Enable DEBUG mode (Administration > Logging and Profiling);
  • Reproduce the problem a few times;
  • Create a support zip (Administration > Atlassian Support Tools > Support Zip);
  • Open a support ticket on https://support.atlassian.com and upload the support zip.

Cheers
Rodrigo

Bill McGowan May 22, 2018

Hi Rodrigo,

Thanks for your reply.

I have restarted Bitbucket Server several times and the errors still occur.

I can't open a support ticket on the Atlassian Support site because I am running a Starter licence for Bitbucket Server. Is there any way I can get a support ZIP to you without it being on a public forum?

Thanks,

Bill

Bill McGowan May 22, 2018

This is the exception taken directly from the altlassian-bitbucket.log file:

 

com.atlassian.bitbucket.ServerException: An error occurred while executing an external process: HZ-GB-2312
at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.evaluateThrowable(GitCommandExitHandler.java:113)
at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.onError(GitCommandExitHandler.java:201)
at com.atlassian.bitbucket.scm.DefaultCommandExitHandler.onExit(DefaultCommandExitHandler.java:31)
at com.atlassian.bitbucket.scm.BaseCommand.callExitHandler(BaseCommand.java:146)
at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.internalGet(BaseCommand.java:280)
at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.get(BaseCommand.java:244)
at com.atlassian.bitbucket.scm.BaseCommand.call(BaseCommand.java:83)
at com.atlassian.stash.internal.content.DefaultContentService.streamFile(DefaultContentService.java:214)
at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
at com.atlassian.stash.internal.rest.content.ContentResource$2.write(ContentResource.java:349)
at com.atlassian.bitbucket.rest.util.JsonStreamingOutput.write(JsonStreamingOutput.java:23)
at com.atlassian.stash.internal.rest.filter.StreamingResponseFilter$ExceptionMappingStreamingOutput.lambda$write$0(StreamingResponseFilter.java:80)
at com.atlassian.stash.internal.rest.filter.StreamingResponseFilter$AbstractStreamingExceptionMapper.stream(StreamingResponseFilter.java:50)
at com.atlassian.stash.internal.rest.filter.StreamingResponseFilter$ExceptionMappingStreamingOutput.write(StreamingResponseFilter.java:80)
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
at com.atlassian.analytics.client.filter.UniversalAnalyticsFilter.doFilter(UniversalAnalyticsFilter.java:92)
at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:39)
at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
at com.atlassian.plugin.connect.plugin.auth.scope.ApiScopingFilter.doFilter(ApiScopingFilter.java:81)
at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:85)
at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:112)
at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75)
at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:94)
at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:67)
at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
at com.atlassian.plugin.connect.plugin.auth.oauth2.DefaultSalAuthenticationFilter.doFilter(DefaultSalAuthenticationFilter.java:69)
at com.atlassian.plugin.connect.plugin.auth.user.ThreeLeggedAuthFilter.doFilter(ThreeLeggedAuthFilter.java:109)
at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:32)
at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:38)
at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:39)
at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:90)
at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:73)
at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:89)
at com.atlassian.stash.internal.hazelcast.ConfigurableWebFilter.doFilter(ConfigurableWebFilter.java:38)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.lang.Thread.run(Unknown Source)
... 280 frames trimmed
Caused by: java.nio.charset.UnsupportedCharsetException: HZ-GB-2312
at java.nio.charset.Charset.forName(Unknown Source)
at com.atlassian.bitbucket.io.TruncatedLineOutputHandler.chooseCharset(TruncatedLineOutputHandler.java:174)
at com.atlassian.bitbucket.io.TruncatedLineOutputHandler.process(TruncatedLineOutputHandler.java:75)
at com.atlassian.bitbucket.io.TruncatedLineOutputHandler.process(TruncatedLineOutputHandler.java:71)
at com.atlassian.bitbucket.scm.SummarizingProcessHandler$DelegatingInputStreamHandler.process(SummarizingProcessHandler.java:184)
at com.atlassian.bitbucket.scm.SummarizingProcessHandler$DelegatingInputStreamHandler.process(SummarizingProcessHandler.java:166)
at com.atlassian.bitbucket.scm.SummarizingProcessHandler.processOutput(SummarizingProcessHandler.java:90)
at com.atlassian.utils.process.ExternalProcessImpl$StdoutHandler.handle(ExternalProcessImpl.java:794)
at com.atlassian.utils.process.ExternalProcessImpl$HandlerLatchedRunnable.doTask(ExternalProcessImpl.java:731)
at com.atlassian.utils.process.LatchedRunnable.run(LatchedRunnable.java:158)
at com.atlassian.utils.process.ExternalProcessImpl$AsynchronousHandlerLatchedRunnable.run(ExternalProcessImpl.java:700)
at com.atlassian.stash.internal.concurrent.DefaultTransferableStateManager$StateTransferringRunnable.run(DefaultTransferableStateManager.java:166)
... 3 common frames omitted
Lucy
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 22, 2018

Hi Bill,

I just tried to reproduce this error and wasn't able to. I put the "~{" in a file (via in browser editing and through using git locally), and was able to edit the file without problems. Could you please give us some more information?

  • What version of Bitbucket are you running?
  • Do you experience this problem with a new repo?
  • Can you reproduce this problem if your file only has the "~{" in it?

Thanks,

Lucy

Bill McGowan May 23, 2018

Hi Lucy,

Thanks for your response.

I have managed to reduce my code file down into just this single line which triggers the error:

 

RETURN TRIM(attribute.val, "~{~}").

 

I added this line to a brand new source file in my existing repository and it failed to display in source view too so it isn't just related to the existing file.

 

I am running Bitbucket Server 5.7.0.

 

Thanks,

Bill

Rodrigo M
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 24, 2018

Hey Bill

Thanks for the information.

I was able to reproduce the issue and opened a bug ticket on our public issue tracker to address it. I would like to recommend you to add it into your watch list to receive the further update from our R&D team and feel free to add your comment.  You can find more detail here about how we fix the bug on this page.

Regards

Rodrigo - Atlassian Support

Bill McGowan May 24, 2018

Hi Rodrigo,

 

Thanks for that. I am watching that bug ticket for future updates.

 

Thanks,

Bill

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events