Git Product home page Git Product logo

Comments (6)

aksvenk avatar aksvenk commented on June 22, 2024

I am encountering the same issue as well with that same exception stack.

Here's a repository that consistently fails when attempting to push with the filesize hook
https://github.com/antitypical/Result

Fixes or workarounds would be appreciated.

from stash-filehooks-plugin.

lucamilanesio avatar lucamilanesio commented on June 22, 2024

From what I can see in the code, it seems that when trying to get the map of the objects sizes, some of them have a null value. Cannot dig any further into this because this happens inside BitBucket which isn't OpenSource, unfortunately :-(

We can avoid at least to crash the entire hook execution by just filtering out the incorrect null values.

Going to propose a PR on this shortly.

Luca

from stash-filehooks-plugin.

christiangalsterer avatar christiangalsterer commented on June 22, 2024

Thanks for providing the PR. It is already merged and I will cut a new release in the next days.

from stash-filehooks-plugin.

christiangalsterer avatar christiangalsterer commented on June 22, 2024

A new release 3.2.2 ia now available in the Atlassian Marketplace.

from stash-filehooks-plugin.

rubenanfinnes avatar rubenanfinnes commented on June 22, 2024

Hi! We are still seeing this error after upgrading plugin to v3.3.2 and Bitbucket Server to v5.9.1. The developer of the project who has the repo experiencing the error say that it is only when committing the reference of a linked sub-module the error occurs, so might be a fringe use case. Just letting you know.

The exception is:

2018-05-16 15:00:30,254 DEBUG [hook-callback:thread-2] user @1O0M7BMx900x21082309x2 12k1w1h 139.115.246.152 SSH - git-receive-pack '/project/repo.git' c.a.bitbucket.scm.BaseCommand Executed /usr/bin/git cat-file --batch-check
2018-05-16 15:00:30,255 WARN [hook-callback:thread-2] user @1O0M7BMx900x21082309x2 12k1w1h 139.115.246.152 SSH - git-receive-pack '/project/repo.git' c.a.s.i.h.r.DefaultRepositoryHookService [project/repo[600]] Error calling com.atlassian.stash.internal.plugin.legacy.CompositeRepositoryHook.preUpdate (org.christiangalsterer.stash-filehooks-plugin:filesize-hook)
java.lang.NullPointerException: null
at java.util.HashMap.merge(HashMap.java:1225)
at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1320)
at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1553)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at org.christiangalsterer.stash.filehooks.plugin.hook.CachingResolver.batchResolve(CachingResolver.java:87)
at org.christiangalsterer.stash.filehooks.plugin.hook.FileSizeHook.onReceive(FileSizeHook.java:82)
at com.atlassian.stash.internal.plugin.legacy.PreReceiveRepositoryHookAdapter.preUpdate(PreReceiveRepositoryHookAdapter.java:29)
at com.atlassian.stash.internal.plugin.legacy.CompositeRepositoryHook.lambda$preUpdate$2(CompositeRepositoryHook.java:76)
at com.atlassian.stash.internal.plugin.legacy.CompositeRepositoryHook.handlingExceptions(CompositeRepositoryHook.java:92)
at com.atlassian.stash.internal.plugin.legacy.CompositeRepositoryHook.preUpdate(CompositeRepositoryHook.java:75)
at com.atlassian.stash.internal.hook.repository.DefaultRepositoryHookService.preUpdate(DefaultRepositoryHookService.java:860)
at com.atlassian.stash.internal.hook.repository.DefaultRepositoryHookService.lambda$preUpdate$4(DefaultRepositoryHookService.java:458)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at com.atlassian.stash.internal.hook.repository.DefaultRepositoryHookService.preUpdate(DefaultRepositoryHookService.java:437)
at com.atlassian.stash.internal.hook.DefaultBuiltInHookHandlerFactory.lambda$preReceive$0(DefaultBuiltInHookHandlerFactory.java:36)
at com.atlassian.stash.internal.scm.git.GitQuarantineHelper.lambda$null$0(GitQuarantineHelper.java:89)
at com.atlassian.stash.internal.hook.DefaultHookService.doHandleRequest(DefaultHookService.java:299)
at com.atlassian.stash.internal.hook.DefaultHookService.handleRequest(DefaultHookService.java:285)
at com.atlassian.stash.internal.hook.DefaultHookService.handleRawRequest(DefaultHookService.java:219)
at com.atlassian.stash.internal.hook.DefaultHookService$1.lambda$run$0(DefaultHookService.java:186)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.lang.Thread.run(Thread.java:748)
... 26 frames trimmed
2018-05-16 15:00:30,255 INFO [hook-callback:thread-2] user @1O0M7BMx900x21082309x2 12k1w1h 139.115.246.152 SSH - git-receive-pack '/project/repo.git' c.a.s.i.h.r.DefaultRepositoryHookService [project/repo[600]] hook 'filesize-hook' vetoed the push request

from stash-filehooks-plugin.

fengxx avatar fengxx commented on June 22, 2024

NPE on submodule will be fixed via #54

from stash-filehooks-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.