Vaadin upload - TypeError: Cannot read property 'sizeBase' of null
up vote
0
down vote
favorite
Vaadin version: 11.0.2
upload component : https://vaadin.com/components/vaadin-upload
When I upload a big file, and get an error on the client side (nothing in the server side):
client-D1AD34905AC1AA5B4DBECA8FB0306D92.cache.js:197 TypeError: Cannot read property '2' of null
Source code used (from vaadin website):
MemoryBuffer buffer = new MemoryBuffer();
Upload upload = new Upload(buffer);
upload.setId("i18n-upload");
upload.addSucceededListener(event -> System.out.println("Done!"));
UploadI18N i18n = new UploadI18N();
i18n.setDropFiles(
new UploadI18N.DropFiles().setOne("Перетащите файл сюда...")
.setMany("Перетащите файлы сюда..."))
.setAddFiles(new UploadI18N.AddFiles()
.setOne("Выбрать файл").setMany("Добавить файлы"))
.setCancel("Отменить")
.setError(new UploadI18N.Error()
.setTooManyFiles("Слишком много файлов.")
.setFileIsTooBig("Слишком большой файл.")
.setIncorrectFileType("Некорректный тип файла."))
.setUploading(new UploadI18N.Uploading()
.setStatus(new UploadI18N.Uploading.Status()
.setConnecting("Соединение...")
.setStalled("Загрузка застопорилась.")
.setProcessing("Обработка файла..."))
.setRemainingTime(
new UploadI18N.Uploading.RemainingTime()
.setPrefix("оставшееся время: ")
.setUnknown(
"оставшееся время неизвестно"))
.setError(new UploadI18N.Uploading.Error()
.setServerUnavailable("Сервер недоступен")
.setUnexpectedServerError(
"Неожиданная ошибка сервера")
.setForbidden("Загрузка запрещена")))
.setUnits(Stream
.of("Б", "Кбайт", "Мбайт", "Гбайт", "Тбайт", "Пбайт",
"Эбайт", "Збайт", "Ибайт")
.collect(Collectors.toList()));
upload.setI18n(i18n);
add(upload);
The problem come from the translation (without translation it works).
I reproduce the bug here with the vaadin flow upload example:
https://github.com/Tyvain/myalert
To test, just import any big file (around 50 Mb).
Live demo of the bug: https://runny.herokuapp.com/
How can I solve this ?
java spring-boot vaadin10 vaadin-upload
add a comment |
up vote
0
down vote
favorite
Vaadin version: 11.0.2
upload component : https://vaadin.com/components/vaadin-upload
When I upload a big file, and get an error on the client side (nothing in the server side):
client-D1AD34905AC1AA5B4DBECA8FB0306D92.cache.js:197 TypeError: Cannot read property '2' of null
Source code used (from vaadin website):
MemoryBuffer buffer = new MemoryBuffer();
Upload upload = new Upload(buffer);
upload.setId("i18n-upload");
upload.addSucceededListener(event -> System.out.println("Done!"));
UploadI18N i18n = new UploadI18N();
i18n.setDropFiles(
new UploadI18N.DropFiles().setOne("Перетащите файл сюда...")
.setMany("Перетащите файлы сюда..."))
.setAddFiles(new UploadI18N.AddFiles()
.setOne("Выбрать файл").setMany("Добавить файлы"))
.setCancel("Отменить")
.setError(new UploadI18N.Error()
.setTooManyFiles("Слишком много файлов.")
.setFileIsTooBig("Слишком большой файл.")
.setIncorrectFileType("Некорректный тип файла."))
.setUploading(new UploadI18N.Uploading()
.setStatus(new UploadI18N.Uploading.Status()
.setConnecting("Соединение...")
.setStalled("Загрузка застопорилась.")
.setProcessing("Обработка файла..."))
.setRemainingTime(
new UploadI18N.Uploading.RemainingTime()
.setPrefix("оставшееся время: ")
.setUnknown(
"оставшееся время неизвестно"))
.setError(new UploadI18N.Uploading.Error()
.setServerUnavailable("Сервер недоступен")
.setUnexpectedServerError(
"Неожиданная ошибка сервера")
.setForbidden("Загрузка запрещена")))
.setUnits(Stream
.of("Б", "Кбайт", "Мбайт", "Гбайт", "Тбайт", "Пбайт",
"Эбайт", "Збайт", "Ибайт")
.collect(Collectors.toList()));
upload.setI18n(i18n);
add(upload);
The problem come from the translation (without translation it works).
I reproduce the bug here with the vaadin flow upload example:
https://github.com/Tyvain/myalert
To test, just import any big file (around 50 Mb).
Live demo of the bug: https://runny.herokuapp.com/
How can I solve this ?
java spring-boot vaadin10 vaadin-upload
There has been known issues in UploadI18N version (see: github.com/vaadin/vaadin-upload-flow/issues/92 ), atleast something is fixed in Upload 1.0.4 version. But I you continue to have problems, I recommend to go and comment that ticket with your observations.
– Tatu Lund
Nov 21 at 6:07
Should I wait to use upload 1.0.4 ? I am using vaadin-bom 11.0.2, and there is no other release yet.
– Tyvain
Nov 21 at 20:10
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Vaadin version: 11.0.2
upload component : https://vaadin.com/components/vaadin-upload
When I upload a big file, and get an error on the client side (nothing in the server side):
client-D1AD34905AC1AA5B4DBECA8FB0306D92.cache.js:197 TypeError: Cannot read property '2' of null
Source code used (from vaadin website):
MemoryBuffer buffer = new MemoryBuffer();
Upload upload = new Upload(buffer);
upload.setId("i18n-upload");
upload.addSucceededListener(event -> System.out.println("Done!"));
UploadI18N i18n = new UploadI18N();
i18n.setDropFiles(
new UploadI18N.DropFiles().setOne("Перетащите файл сюда...")
.setMany("Перетащите файлы сюда..."))
.setAddFiles(new UploadI18N.AddFiles()
.setOne("Выбрать файл").setMany("Добавить файлы"))
.setCancel("Отменить")
.setError(new UploadI18N.Error()
.setTooManyFiles("Слишком много файлов.")
.setFileIsTooBig("Слишком большой файл.")
.setIncorrectFileType("Некорректный тип файла."))
.setUploading(new UploadI18N.Uploading()
.setStatus(new UploadI18N.Uploading.Status()
.setConnecting("Соединение...")
.setStalled("Загрузка застопорилась.")
.setProcessing("Обработка файла..."))
.setRemainingTime(
new UploadI18N.Uploading.RemainingTime()
.setPrefix("оставшееся время: ")
.setUnknown(
"оставшееся время неизвестно"))
.setError(new UploadI18N.Uploading.Error()
.setServerUnavailable("Сервер недоступен")
.setUnexpectedServerError(
"Неожиданная ошибка сервера")
.setForbidden("Загрузка запрещена")))
.setUnits(Stream
.of("Б", "Кбайт", "Мбайт", "Гбайт", "Тбайт", "Пбайт",
"Эбайт", "Збайт", "Ибайт")
.collect(Collectors.toList()));
upload.setI18n(i18n);
add(upload);
The problem come from the translation (without translation it works).
I reproduce the bug here with the vaadin flow upload example:
https://github.com/Tyvain/myalert
To test, just import any big file (around 50 Mb).
Live demo of the bug: https://runny.herokuapp.com/
How can I solve this ?
java spring-boot vaadin10 vaadin-upload
Vaadin version: 11.0.2
upload component : https://vaadin.com/components/vaadin-upload
When I upload a big file, and get an error on the client side (nothing in the server side):
client-D1AD34905AC1AA5B4DBECA8FB0306D92.cache.js:197 TypeError: Cannot read property '2' of null
Source code used (from vaadin website):
MemoryBuffer buffer = new MemoryBuffer();
Upload upload = new Upload(buffer);
upload.setId("i18n-upload");
upload.addSucceededListener(event -> System.out.println("Done!"));
UploadI18N i18n = new UploadI18N();
i18n.setDropFiles(
new UploadI18N.DropFiles().setOne("Перетащите файл сюда...")
.setMany("Перетащите файлы сюда..."))
.setAddFiles(new UploadI18N.AddFiles()
.setOne("Выбрать файл").setMany("Добавить файлы"))
.setCancel("Отменить")
.setError(new UploadI18N.Error()
.setTooManyFiles("Слишком много файлов.")
.setFileIsTooBig("Слишком большой файл.")
.setIncorrectFileType("Некорректный тип файла."))
.setUploading(new UploadI18N.Uploading()
.setStatus(new UploadI18N.Uploading.Status()
.setConnecting("Соединение...")
.setStalled("Загрузка застопорилась.")
.setProcessing("Обработка файла..."))
.setRemainingTime(
new UploadI18N.Uploading.RemainingTime()
.setPrefix("оставшееся время: ")
.setUnknown(
"оставшееся время неизвестно"))
.setError(new UploadI18N.Uploading.Error()
.setServerUnavailable("Сервер недоступен")
.setUnexpectedServerError(
"Неожиданная ошибка сервера")
.setForbidden("Загрузка запрещена")))
.setUnits(Stream
.of("Б", "Кбайт", "Мбайт", "Гбайт", "Тбайт", "Пбайт",
"Эбайт", "Збайт", "Ибайт")
.collect(Collectors.toList()));
upload.setI18n(i18n);
add(upload);
The problem come from the translation (without translation it works).
I reproduce the bug here with the vaadin flow upload example:
https://github.com/Tyvain/myalert
To test, just import any big file (around 50 Mb).
Live demo of the bug: https://runny.herokuapp.com/
How can I solve this ?
java spring-boot vaadin10 vaadin-upload
java spring-boot vaadin10 vaadin-upload
edited Nov 21 at 4:38
asked Nov 21 at 3:28
Tyvain
75331130
75331130
There has been known issues in UploadI18N version (see: github.com/vaadin/vaadin-upload-flow/issues/92 ), atleast something is fixed in Upload 1.0.4 version. But I you continue to have problems, I recommend to go and comment that ticket with your observations.
– Tatu Lund
Nov 21 at 6:07
Should I wait to use upload 1.0.4 ? I am using vaadin-bom 11.0.2, and there is no other release yet.
– Tyvain
Nov 21 at 20:10
add a comment |
There has been known issues in UploadI18N version (see: github.com/vaadin/vaadin-upload-flow/issues/92 ), atleast something is fixed in Upload 1.0.4 version. But I you continue to have problems, I recommend to go and comment that ticket with your observations.
– Tatu Lund
Nov 21 at 6:07
Should I wait to use upload 1.0.4 ? I am using vaadin-bom 11.0.2, and there is no other release yet.
– Tyvain
Nov 21 at 20:10
There has been known issues in UploadI18N version (see: github.com/vaadin/vaadin-upload-flow/issues/92 ), atleast something is fixed in Upload 1.0.4 version. But I you continue to have problems, I recommend to go and comment that ticket with your observations.
– Tatu Lund
Nov 21 at 6:07
There has been known issues in UploadI18N version (see: github.com/vaadin/vaadin-upload-flow/issues/92 ), atleast something is fixed in Upload 1.0.4 version. But I you continue to have problems, I recommend to go and comment that ticket with your observations.
– Tatu Lund
Nov 21 at 6:07
Should I wait to use upload 1.0.4 ? I am using vaadin-bom 11.0.2, and there is no other release yet.
– Tyvain
Nov 21 at 20:10
Should I wait to use upload 1.0.4 ? I am using vaadin-bom 11.0.2, and there is no other release yet.
– Tyvain
Nov 21 at 20:10
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53404855%2fvaadin-upload-typeerror-cannot-read-property-sizebase-of-null%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
There has been known issues in UploadI18N version (see: github.com/vaadin/vaadin-upload-flow/issues/92 ), atleast something is fixed in Upload 1.0.4 version. But I you continue to have problems, I recommend to go and comment that ticket with your observations.
– Tatu Lund
Nov 21 at 6:07
Should I wait to use upload 1.0.4 ? I am using vaadin-bom 11.0.2, and there is no other release yet.
– Tyvain
Nov 21 at 20:10