Vaadin upload - TypeError: Cannot read property 'sizeBase' of null












0















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 '18 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 '18 at 20:10
















0















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 '18 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 '18 at 20:10














0












0








0








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 '18 at 4:38







Tyvain

















asked Nov 21 '18 at 3:28









TyvainTyvain

83731132




83731132













  • 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 '18 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 '18 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 '18 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 '18 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 '18 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 '18 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 '18 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 '18 at 20:10












0






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',
autoActivateHeartbeat: false,
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

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




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







這個網誌中的熱門文章

Hercules Kyvelos

Tangent Lines Diagram Along Smooth Curve

Yusuf al-Mu'taman ibn Hud