Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] UI Design Stage2 #42

Closed
wants to merge 4 commits into from
Closed

Conversation

IshaGupta18
Copy link
Collaborator

Okay so this is the correct way of doing the job @namangupta01 thank you for correcting me!
@jywarren kindly have a look at this one!
I have tried to develop a workaround for fetching CSV data from a remote file, without getting the CORS (#35). It works well, however I am not able to pass the fetched data to another function, but I am able to print it at the console.
image

Also, I am facing the same bug I was facing here #39

image

@namangupta01 @IgorWilbert @gauravano @Souravirus I would really appreciate if you could help me debug here so that this PR is merged ASAP. Thanks a lot!

@jywarren
Copy link
Member

Huh, interesting! Can you elaborate - you said you can't pass it, but when you try what happens? Thanks!

@jywarren
Copy link
Member

Could a unit test be written against this intended functionality, to show the error?

@IshaGupta18
Copy link
Collaborator Author

#45 is the issue for this, I have pointed out the code there which is doing this. Its unable to access the data if I pass it to the other function, basically it enters the catch block. Let's discuss this one at #45. Thanks a lot!

@jywarren
Copy link
Member

Hi, @IshaGupta18 -- thanks! Would you mind trying to push this to your github pages branch, along with your dependencies, so we can try it out? You'll need to make a gh-pages branch, and to add your node_modules folder within that branch, and push the whole thing up. Maybe @rexagod could help you with this as @rexagod recently did this in https://github.com/publiclab/matcher-core/issues/1

@jywarren
Copy link
Member

Oh i missed your last comment. Checking now at #45

value: function handleFileSelectremote(val) {
var proxyurl = "https://cors-anywhere.herokuapp.com/";
var url = val;
fetch(proxyurl + url).then(function (response) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, is it on these lines that the error is occurring? Maybe with input from this comment you can output the complete error?

Copy link
Member

@rexagod rexagod Jun 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jywarren I maybe wrong, but wasn't this issue resolved?

return response.text();
}).then(function (contents) {
return console.log(contents);
})["catch"](function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not completely familiar with this syntax but i think it might be:

Suggested change
})["catch"](function () {
})["catch"](function (e) {
console.log('error!', e);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jywarren I think this should be automatically incorporated once @IshaGupta18 passes the error object below (as I suggested) since the dist is built from that?

.catch(() => console.log("Can’t access " + url + " response. Blocked by browser?")) ;

@IshaGupta18
Copy link
Collaborator Author

Yes this is resolved, I have mentioned in #43 and this PR can be closed now. All the worked is shifted to #43 and let's have the discussion there. I am terribly sorry for creating confusion. @jywarren kindly review #43 ! Thanks a lot!

@IshaGupta18 IshaGupta18 added bug Something isn't working gsoc summer of code labels Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gsoc summer of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants