errbuddy / babel-asset-pipeline

babel.js transformation for asset-pipeline
10 stars 6 forks source link

Error on first request #14

Open ctoestreich opened 8 years ago

ctoestreich commented 8 years ago

We frequently see this roll across the console when first loading our site after boot:

org.mozilla.javascript.EcmaError: TypeError: Cannot find function registerSetAttribute in object 
function (ownerDocument) {...}. (file:/Users/christian.oestreich/.gradle/caches/modules-2/files-2.1/net.errbuddy.plugins/babel-asset-pipeline/1.4.5/cb824a9e1d6b8e6e85e1d904444ed4fa07b4bd87/babel-asset-pipeline-1.4.5.jar!/asset/pipeline/babel/env.rhino.js#8372)
    at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3689)
    at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3667)
    at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3695)
    at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3714)
    at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3786)
    at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2268)
    at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2250)
    at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1317)
    at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
    at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
    at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
    at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3090)
    at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:120)
    at org.mozilla.javascript.Context.evaluateString(Context.java:1079)
    at org.mozilla.javascript.Context$evaluateString$14.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
    at asset.pipeline.babel.BabelProcessor.<init>(BabelProcessor.groovy:39)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrConstructorNewInstance(ReflectiveInterceptor.java:1075)
    at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:80)
    at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:74)
    at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1712)
    at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1529)
    at org.codehaus.groovy.runtime.InvokerHelper.invokeConstructorOf(InvokerHelper.java:950)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.newInstance(DefaultGroovyMethods.java:15626)
    at asset.pipeline.AbstractAssetFile.processedStream(AbstractAssetFile.groovy:163)
    at asset.pipeline.DirectiveProcessor.fileContents(DirectiveProcessor.groovy:307)
    at asset.pipeline.DirectiveProcessor$fileContents$1.call(Unknown Source)
    at asset.pipeline.AssetPipeline.serveUncompiledAsset(AssetPipeline.groovy:65)
    at asset.pipeline.AssetPipelineFilter.doFilterInternal(AssetPipelineFilter.groovy:174)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:112)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:75)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
peh commented 8 years ago

It's basically the root cause of https://github.com/peh/grails-babel-asset-pipeline/issues/7

Will look into it as soon as I am back in berlin. As a workaround: reloading the page should fix it