Skip to content

[bug] File without extension breaks file storage #3684

@ivicac

Description

@ivicac

Message
Range [-1, 0) out of bounds for length 0
Stack Trace
java.lang.StringIndexOutOfBoundsException: Range [-1, 0) out of bounds for length 0
at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:55)
at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:52)
at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:213)
at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:210)
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Preconditions.java:112)
at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Preconditions.java:349)
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4937)
at java.base/java.lang.String.substring(String.java:2899)
at java.base/java.lang.String.substring(String.java:2872)
at com.bytechef.file.storage.filesystem.service.FilesystemFileStorageService.doStoreFileContent(FilesystemFileStorageService.java:268)
at com.bytechef.file.storage.filesystem.service.FilesystemFileStorageService.storeFileContent(FilesystemFileStorageService.java:245)
at com.bytechef.file.storage.filesystem.service.FilesystemFileStorageService.storeFileContent(FilesystemFileStorageService.java:233)
at com.bytechef.platform.file.storage.TempFileStorageImpl.storeFileContent(TempFileStorageImpl.java:66)
at com.bytechef.platform.component.context.ContextImpl$FileImpl.storeContent(ContextImpl.java:448)
at com.bytechef.component.google.mail.util.GoogleMailUtils.lambda$getFileEntries$0(GoogleMailUtils.java:499)
at com.bytechef.platform.component.context.ContextImpl.file(ContextImpl.java:109)
at com.bytechef.component.google.mail.util.GoogleMailUtils.getFileEntries(GoogleMailUtils.java:498)
at com.bytechef.component.google.mail.util.GoogleMailUtils.getSimpleMessage(GoogleMailUtils.java:434)
at com.bytechef.component.google.mail.action.GoogleMailGetMailAction.perform(GoogleMailGetMailAction.java:67)
at com.bytechef.platform.component.service.ActionDefinitionServiceImpl.executeSingleConnectionPerform(ActionDefinitionServiceImpl.java:234)
at com.bytechef.platform.component.facade.ActionDefinitionFacadeImpl.lambda$executePerform$0(ActionDefinitionFacadeImpl.java:158)
at com.bytechef.platform.component.util.TokenRefreshHelper.executeSingleConnectionFunction(TokenRefreshHelper.java:78)
at com.bytechef.platform.component.facade.ActionDefinitionFacadeImpl.executePerform(ActionDefinitionFacadeImpl.java:155)
at com.bytechef.platform.workflow.worker.task.handler.AbstractTaskHandler.handle(AbstractTaskHandler.java:59)
at com.bytechef.atlas.worker.TaskWorker.doExecuteTask(TaskWorker.java:194)
at com.bytechef.atlas.worker.TaskWorker.lambda$onTaskExecutionEvent$0(TaskWorker.java:116)
at com.bytechef.tenant.concurrent.TenantThreadPoolTaskExecutor.lambda$getTenantRunnable$0(TenantThreadPoolTaskExecutor.java:56)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
at java.base/java.lang.VirtualThread.run(VirtualThread.java:456)

Metadata

Metadata

Assignees

Labels

backendConcerning any and all backend issuesbugSomething isn't working

Type

Projects

Status

🏗 In progress

Relationships

None yet

Development

No branches or pull requests

Issue actions