Skip to content

[bug]: Google Mail GetMailAction fails if an email has no attachment #3814

@igorbeslic

Description

@igorbeslic

Describe the bug

{
"stackTrace": [
"java.lang.NullPointerException",
"\tat java.base/java.util.Objects.requireNonNull(Objects.java:220)",
"\tat com.bytechef.platform.component.context.FileEntryImpl.(FileEntryImpl.java:41)",
"\tat com.bytechef.platform.component.context.FileEntryImpl.(FileEntryImpl.java:37)",
"\tat com.bytechef.platform.component.context.ContextImpl$FileImpl.storeContent(ContextImpl.java:448)",
"\tat com.bytechef.component.google.mail.util.GoogleMailUtils.lambda$getFileEntries$0(GoogleMailUtils.java:460)",
"\tat com.bytechef.platform.component.context.ContextImpl.file(ContextImpl.java:109)",
"\tat com.bytechef.component.google.mail.util.GoogleMailUtils.getFileEntries(GoogleMailUtils.java:459)",
"\tat com.bytechef.component.google.mail.util.GoogleMailUtils.getSimpleMessage(GoogleMailUtils.java:395)",
"\tat com.bytechef.component.google.mail.action.GoogleMailGetMailAction.perform(GoogleMailGetMailAction.java:65)",
"\tat com.bytechef.platform.component.service.ActionDefinitionServiceImpl.executeSingleConnectionPerform(ActionDefinitionServiceImpl.java:413)",
"\tat com.bytechef.platform.component.service.ActionDefinitionServiceImpl.lambda$executePerform$1(ActionDefinitionServiceImpl.java:185)",
"\tat com.bytechef.platform.component.util.TokenRefreshHelper.executeSingleConnectionFunction(TokenRefreshHelper.java:78)",
"\tat com.bytechef.platform.component.service.ActionDefinitionServiceImpl.executePerform(ActionDefinitionServiceImpl.java:182)",
"\tat com.bytechef.platform.component.facade.ActionDefinitionFacadeImpl.executePerform(ActionDefinitionFacadeImpl.java:90)",
"\tat com.bytechef.platform.workflow.worker.task.handler.AbstractTaskHandler.handle(AbstractTaskHandler.java:59)",
"\tat com.bytechef.atlas.worker.TaskWorker.doExecuteTask(TaskWorker.java:204)",
"\tat com.bytechef.atlas.worker.TaskWorker.lambda$onTaskExecutionEvent$0(TaskWorker.java:126)",
"\tat com.bytechef.tenant.concurrent.TenantThreadPoolTaskExecutor.lambda$getTenantRunnable$0(TenantThreadPoolTaskExecutor.java:56)",
"\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)",
"\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)",
"\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)",
"\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)",
"\tat java.base/java.lang.VirtualThread.run(VirtualThread.java:456)"
]
}

Steps To Reproduce

Not sure about steps. I suspect that email has no BODY at all. Only subject... We simply expect email message and that could be a problem.

Analise PTRG emails... those emails are from monitoring systems... and usually no any data in body

Expected behavior

Process email without message.

Version

0.1.7

OS

sanoma

Browser

chrome

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions