Build Cloud-Native apps with Apache Cassandra

GOT QUESTIONS from the Workshop? You're in the right place! Post a question here and we'll get you answers.

Click here for Week 8 Materials and Homework.

Follow us on Eventbrite to get notified when new workshops are scheduled!


question

diptesh1410_193094 avatar image
diptesh1410_193094 asked ·

Why am I getting an error when I upload my Astra secure connect bundle on a Windows machine for the workshop?

I am on windows system. I am using java backend on gitpod. But while uploading the secure bundle connect to open the UI the zip file (secure bundle connect) is not getting uploaded.

workshop
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

bettina.swynnerton avatar image
bettina.swynnerton answered ·

Hi @diptesh1410_193094,

since you are working on gitpod, would you look through the steps in the following post and comment with the exact error you are seeing in the developer tools?

For Java: https://community.datastax.com/questions/6805/

Note that we updated the Java code since the workshop, so start a new gitpod workspace and try again.

Thanks for your help, we want to understand why this is not working for you.

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

bettina.swynnerton avatar image
bettina.swynnerton answered ·

We have tested a workaround to the problem with the file upload into the form data on Windows 10, and we have several community member reporting that the workaround worked for them.

We believe that the problem is that the file type of the zip file is not correctly recognised or advertised by Windows 10 file explorer. This in turn causes the drag and drop box to reject the file.

The following workaround worked for me on my Windows 10 desktop, tested with Chrome.

In gitpod, find the file CredentialsDialog.jsx:

/workspace/cassandra-workshop-series/week4-AppDev-api/getting-started-with-astra-ui/src/components/CredentialsDialog.jsx

Comment out line 98 (here in bold):

                    {(!files || !files.length) &&
                        <DialogContentText>
                            Choose your Secure Connect Bundle:*
                            <DropzoneArea
                                //acceptedFiles={["application/zip"]}
                                filesLimit={1}
                                dropzoneText="Drag and Drop your Secure Connect Bundle here or click to choose"
                                onChange={updateFiles}
                                showFileNames={true}
                                showPreviews={true}
                                showPreviewsInDropzone={false}
                                showAlerts={false}
                            />
                        </DialogContentText>
                    }

In this line, we specify the allowed file types. By commenting it out, we allow any type.

Save the file, and restart the UI.

In newer versions of the repository, these changes should already be implemented.


Now, when you want to populate the connection dialog, we face another issue with the context of the popup window when we click to choose the file. For an easy workaround, do not click:

Do not click on the drag and drop box to choose the file.

Instead, open a file explorer and drop the secure bundle from the explorer into the box.

In my tests, this allowed me to populate the dialog.

After that I could successfully test the connection and save for database access.

Please let me know if this works for you.

Thanks for your patience!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.