Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline fails at email step: Failed to invoke workflow.onComplete event handler #320

Closed
rarthur-eicc opened this issue Jul 15, 2022 · 6 comments
Labels
bug Something isn't working
Milestone

Comments

@rarthur-eicc
Copy link

Description of the bug

Hi,

After upgrading to 2.5, I am noticing an error with failed samples that do not meet the 1000 read mapped threshold. We use this for negative controls and thus expect to see these fail, but it usually generates a little summary email with the number of aligned reads per failed sample. This isn't happening, and this is the part of the .nextflow.log I think is relevant to this:

Jul-15 08:53:47.620 [main] ERROR nextflow.script.WorkflowMetadata - Failed to invoke `workflow.onComplete` event handler
groovy.lang.GroovyRuntimeException: Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed:
GStringTemplateScript2.groovy: 54: Unexpected character: '\'' @ line 54, column 53.
   fail_mapped_reads.sort().join('</code></
                                 ^

1 error

	at groovy.text.GStringTemplateEngine$GStringTemplate.<init>(GStringTemplateEngine.java:200)
	at groovy.text.GStringTemplateEngine.createTemplate(GStringTemplateEngine.java:114)
	at groovy.text.TemplateEngine.createTemplate(TemplateEngine.java:58)
	at groovy.text.TemplateEngine$createTemplate.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139)
	at NfcoreTemplate.email(NfcoreTemplate.groovy:113)
	at NfcoreTemplate$email$4.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
	at Script_cbf077bf$_runScript_closure3.doCall(Script_cbf077bf:652)
	at Script_cbf077bf$_runScript_closure3.doCall(Script_cbf077bf)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
	at groovy.lang.Closure.call(Closure.java:412)
	at groovy.lang.Closure.call(Closure.java:406)
	at nextflow.script.WorkflowMetadata$_invokeOnComplete_closure4.doCall(WorkflowMetadata.groovy:389)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
	at groovy.lang.Closure.call(Closure.java:412)
	at groovy.lang.Closure.call(Closure.java:428)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2358)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2343)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2384)
	at nextflow.script.WorkflowMetadata.invokeOnComplete(WorkflowMetadata.groovy:387)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1268)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
	at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:1029)
	at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:1012)
	at org.codehaus.groovy.runtime.InvokerHelper.invokeMethodSafe(InvokerHelper.java:101)
	at nextflow.script.WorkflowMetadata$_closure3.doCall(WorkflowMetadata.groovy:252)
	at nextflow.script.WorkflowMetadata$_closure3.call(WorkflowMetadata.groovy)
	at nextflow.Session.shutdown0(Session.groovy:675)
	at nextflow.Session.destroy(Session.groovy:625)
	at nextflow.script.ScriptRunner.terminate(ScriptRunner.groovy:222)
	at nextflow.script.ScriptRunner.execute(ScriptRunner.groovy:122)
	at nextflow.cli.CmdRun.run(CmdRun.groovy:337)
	at nextflow.cli.Launcher.run(Launcher.groovy:480)
	at nextflow.cli.Launcher.main(Launcher.groovy:639)

I've attached the nextflow.log and my samplesheet used to parse this. It won't let me upload a .sh file, so I've changed it to .txt and included it here.

Command used and terminal output

The command to invoke viralrecon 2.5 was:
`nextflow run nf-core/viralrecon -profile docker --input samplesheet.csv --platform illumina --protocol amplicon --genome 'MN908947.3' --primer_bed swift_refv3_primers.bed --ivar_trim_offset 5 --skip_assembly --skip_kraken2 --multiqc_config '/home/rarthur/new_multiqc_config.yaml' --email 'rarthu3@emory.edu' --outdir ./results`

Relevant files

nextflow.log
samplesheet.csv
water_only.txt

System information

No response

@NeginValizadegan
Copy link

NeginValizadegan commented Feb 21, 2023

The problem still persists. Any plans to fix this in viralrecon pipeline?

@drpatelh drpatelh changed the title Error in reporting samples that do not meet read alignment threshold in 2.5 Pipeline fails at email step: Failed to invoke workflow.onComplete event handler Mar 11, 2023
drpatelh added a commit to drpatelh/nf-core-viralrecon that referenced this issue Mar 11, 2023
drpatelh added a commit that referenced this issue Mar 12, 2023
@drpatelh
Copy link
Member

This should be fixed now in dec2a21 so closing this issue @rarthur-eicc @NeginValizadegan . It was an issue with the HTML syntax used for the email code.

Be great if you can test the dev version of the pipeline before we release. Feel free to re-open if the problem persists.

nextflow pull nf-core/viralrecon -r dev
nextflow run nf-core/viralrecon -r dev <YOUR_PARAMETERS>

@NeginValizadegan
Copy link

This should be fixed now in dec2a21 so closing this issue @rarthur-eicc @NeginValizadegan . It was an issue with the HTML syntax used for the email code.

Be great if you can test the dev version of the pipeline before we release. Feel free to re-open if the problem persists.

nextflow pull nf-core/viralrecon -r dev
nextflow run nf-core/viralrecon -r dev <YOUR_PARAMETERS>

Thanks! I will check it out and let you know. Thanks!

@NeginValizadegan
Copy link

This should be fixed now in dec2a21 so closing this issue @rarthur-eicc @NeginValizadegan . It was an issue with the HTML syntax used for the email code.

Be great if you can test the dev version of the pipeline before we release. Feel free to re-open if the problem persists.

nextflow pull nf-core/viralrecon -r dev
nextflow run nf-core/viralrecon -r dev <YOUR_PARAMETERS>

I checked this with the dev branch and it's working now :) Thanks for fixing it and sorry for the delay. I wanted to try it out on the new project we'll receive hence the delay. When are you expecting to update the master branch?

@drpatelh
Copy link
Member

No worries! The pipeline was released last week. You can now run with -r 2.6.0

@NeginValizadegan
Copy link

No worries! The pipeline was released last week. You can now run with -r 2.6.0

ha ha I tried 2.6 and it didn't work. I missed the 0 at the end. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants