Coder Social home page Coder Social logo

glot-snippets's People

Contributors

javierprovecho avatar prasmussen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

glot-snippets's Issues

Error on every request

Hello @prasmussen,

I had followed your instructions for compiling glot-snippets and glot-run, and while app runs with a few tweaks, it always return HTTP 500 for each request. The error log is so cryptic. Here is an example:

(error doesn't have \n so everything is in a single line)

08:08:39.692 [error] Ranch listener http had connection process started with cowboy_protocol:start_link/4 at <0.782.0> exit with reason: [{reason,{noproc,{gen_server,call,[snippet_srv,{list_public_excl_untitled,{20,0}}]}}},{mfa,{snippets_resource,list,2}},{stacktrace,[{gen_server,call,2,[{file,"gen_server.erl"},{line,204}]},{snippets_resource,list_public,4,[{file,"src/resources/snippets_resource.erl"},{line,103}]},{snippets_resource,list,2,[{file,"src/resources/snippets_resource.erl"},{line,88}]},{cowboy_rest,call,3,[{file,"src/cowboy_rest.erl"},{line,976}]},{cowboy_rest,set_resp_body,2,[{file,"src/cowboy_rest.erl"},{line,858}]},{cowboy_protocol,execute,4,[{file,"src/cowboy_protocol.erl"},{line,442}]}]},{req,[{socket,#Port<0.7288>},{transport,ranch_tcp},{connection,keepalive},{pid,<0.782.0>},{method,<<"GET">>},{version,'HTTP/1.1'},{peer,{{10,168,3,1},50790}},{host,<<"snippets.glot.svc.cluster.local">>},{host_info,undefined},{port,80},{path,<<"/snippets">>},{path_info,undefined},{qs,<<"page=1&per_page=20&include_untitled=false">>},{qs_vals,undefined},{bindings,[]},{headers,[{<<"host">>,<<"snippets.glot.svc.cluster.local">>},{<<"accept-encoding">>,<<"gzip">>},{<<"content-type">>,<<"application/json">>},{<<"user-agent">>,<<"haskell wreq-0.4.1.0">>}]},{p_headers,[{<<"if-modified-since">>,undefined},{<<"if-none-match">>,undefined},{<<"if-unmodified-since">>,undefined},{<<"if-match">>,undefined},{<<"accept">>,undefined}]},{cookies,undefined},{meta,[{media_type,{<<"application">>,<<"json">>,'*'}},{charset,undefined}]},{body_state,waiting},{buffer,<<>>},{multipart,undefined},{resp_compress,false},{resp_state,waiting},{resp_headers,[{<<"content-type">>,[<<"application">>,<<"/">>,<<"json">>,<<>>]}]},{resp_body,<<>>},{onresponse,#Fun<http_util.log_response.4>}]},{state,{state,<<"anonymous">>,{1,20}}}]

CouchDB is running fine, but I'm thinking if it needs some kind of initialization. At first, I thought the problem was with the database connection chain, but I also saw a similar error on glot-run which doesn't use any database:

08:01:36.822 [error] Ranch listener http had connection process started with cowboy_protocol:start_link/4 at <0.1108.0> exit with reason: [{reason,{noproc,{gen_server,call,[language_srv,{list}]}}},{mfa,{language_resource,resource_exists,2}},{stacktrace,[{gen_server,call,2,[{file,"gen_server.erl"},{line,204}]},{language,list_names,0,[{file,"src/models/language.erl"},{line,49}]},{language,is_supported,1,[{file,"src/models/language.erl"},{line,35}]},{language_resource,resource_exists,2,[{file,"src/resources/language_resource.erl"},{line,34}]},{cowboy_rest,call,3,[{file,"src/cowboy_rest.erl"},{line,976}]},{cowboy_rest,expect,6,[{file,"src/cowboy_rest.erl"},{line,960}]},{cowboy_protocol,execute,4,[{file,"src/cowboy_protocol.erl"},{line,442}]}]},{req,[{socket,#Port<0.7380>},{transport,ranch_tcp},{connection,keepalive},{pid,<0.1108.0>},{method,<<"GET">>},{version,'HTTP/1.1'},{peer,{{10,168,3,1},41064}},{host,<<"run.glot.svc.cluster.local">>},{host_info,undefined},{port,80},{path,<<"/languages/bash">>},{path_info,undefined},{qs,<<>>},{qs_vals,undefined},{bindings,[{name,<<"bash">>}]},{headers,[{<<"host">>,<<"run.glot.svc.cluster.local">>},{<<"accept-encoding">>,<<"gzip">>},{<<"content-type">>,<<"application/json">>},{<<"user-agent">>,<<"haskell wreq-0.4.1.0">>}]},{p_headers,[{<<"accept">>,undefined}]},{cookies,undefined},{meta,[{media_type,{<<"application">>,<<"json">>,'*'}},{charset,undefined}]},{body_state,waiting},{buffer,<<>>},{multipart,undefined},{resp_compress,false},{resp_state,waiting},{resp_headers,[{<<"content-type">>,[<<"application">>,<<"/">>,<<"json">>,<<>>]}]},{resp_body,<<>>},{onresponse,#Fun<http_util.log_response.4>}]},{state,{state,undefined}}]

I'm using erlang 18. I forked your repos for making some tweaks to make it work. You can check them out here:

https://github.com/javierprovecho/glot-run
https://github.com/javierprovecho/glot-snippets
https://github.com/javierprovecho/glot-www

I also created Dockerfiles for quicker deployment. If you use Docker, you can pull the images from here and experiment the same errors I see:

docker pull javierprovecho/glot-run
docker pull javierprovecho/glot-snippets
docker pull javierprovecho/glot-www

I look forward to make your project easier to deploy.

Thanks in advance for your support.

How long are snippets kept?

I'm curious if snippets are deleted after some amount of time. Could this be put on the website / GitHub? Thanks!

embed snippet: keep editor theme

It would be interesting to either save the editor theme when I save the snippet or to be able to specify it when embedding a snippet.

When execute `make_release.sh` got an error

 ./make_release.sh
===> Verifying dependencies...
===> Compiling glot
===> Compiling /root/glot/glot-snippets/_build/default/lib/glot/src/resources/admin_root_resource.erl failed
/root/glot/glot-snippets/_build/default/lib/glot/src/resources/admin_root_resource.erl:27: syntax error before: '{'

/root/glot/glot-snippets/_build/default/lib/glot/src/resources/admin_root_resource.erl:2: function root/2 undefined

===> Verifying dependencies...
===> Compiling glot
===> Compiling /root/glot/glot-snippets/_build/default/lib/glot/src/resources/admin_root_resource.erl failed
/root/glot/glot-snippets/_build/default/lib/glot/src/resources/admin_root_resource.erl:27: syntax error before: '{'

/root/glot/glot-snippets/_build/default/lib/glot/src/resources/admin_root_resource.erl:2: function root/2 undefined

./make_release.sh: line 8: cd: _build/default/rel: No such file or directory
tar: glot: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.