Skip to content

[$30] - 'Download' button is not working #234

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

Closed
sdgun opened this issue Aug 24, 2017 · 11 comments
Closed

[$30] - 'Download' button is not working #234

sdgun opened this issue Aug 24, 2017 · 11 comments
Assignees

Comments

@sdgun
Copy link
Collaborator

sdgun commented Aug 24, 2017

Steps to Reproduce

Actual Result(s)

Expected Result(s)

  • Must download the submission

Environment

  • Device(s): Laptop
  • Operating System: Windows 7 64bit
  • Browser(s): Chrome 60.0.3112.101 (Official Build) (64-bit)

Image/Video/JS Log/Console Log (If not attached here, Please check the comments section)

@sdgun
Copy link
Collaborator Author

sdgun commented Aug 24, 2017

33

@birdofpreyru
Copy link
Collaborator

Accepted, 3 points.

@birdofpreyru
Copy link
Collaborator

Current implementation was done some time ago and works for design challenges only. The fix should ensure that it also works properly for development challenges (and, if possible, the same code is used both for design and dev challenges to download submissions).

@birdofpreyru birdofpreyru changed the title 'Download' button is not working [$30] - 'Download' button is not working Aug 25, 2017
@tilumi
Copy link

tilumi commented Aug 28, 2017

@birdofpreyru
Hi, I want to work on this issue, can I get the permission to assign this issue to me?

@tilumi
Copy link

tilumi commented Aug 29, 2017

@sdgun @birdofpreyru
I start with NODE_ENV=production npm start on my local machine & navigate to http://local.topcoder-dev.com:3000/challenges/30059030/my-submissions but show nothing
screenshot 2017-08-29 13 52 56
and I see a error occurs on the console

Failed to get challenge details! TypeError: Cannot read property 'track' of undefined
    at /Users/lucasmf/git/community-app/src/shared/actions/challenge.js:38:20
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

While the http://community-app.topcoder.com/challenges/30059030/my-submissions (only host & port changed) shows my submissions:
screenshot 2017-08-29 13 55 20
Is there any configuration I missed?

@birdofpreyru
Copy link
Collaborator

@tilumi Yes, for production backend you should:

  1. Permit node to listen on port 80
  2. NODE_ENV=production PORT=80 npm run dev (npm run dev is better cause it start in development mode, with hot module reloading).
  3. And then you should access as local.topcoder.com

@tilumi
Copy link

tilumi commented Aug 29, 2017

Ok, it works, thanks!

@tilumi
Copy link

tilumi commented Aug 29, 2017

Hi, @birdofpreyru
Is there any backend API documentation?

@birdofpreyru
Copy link
Collaborator

@tilumi well, it is fragmented (different places for different pieces of the backend).
for this, just check in the existing code, how submissions are downloaded at challenge results tab of challenge details page. Basically, for dev challenges, the download url is just stored in the redux for each submission. For design ones, we have to compose an URL to a legacy studio backend, using challenge ID.

@tilumi
Copy link

tilumi commented Aug 29, 2017

OK, thanks a lot

@tilumi
Copy link

tilumi commented Aug 29, 2017

The PR: #414

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants