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 ?










share|improve this question
























  • 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















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 ?










share|improve this question
























  • 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













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 ?










share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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


















  • 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

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















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






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














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





















































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







Popular posts from this blog

Berounka

Sphinx de Gizeh

Different font size/position of beamer's navigation symbols template's content depending on regular/plain...