~edwardloveall/scribe

8 2

Error when accessing medium articles: Failed to raise an exception: END_OF_STACK

Details
Message ID
<Y9A14doLQ-xjx4rejK-aCR5c9-3DEddNt5uAHAep908xTLg_rVfgTydzXX0u-exvKyp-wLdZpq4eh0ju_lU9hLDGDMDS8VksVHM423eUM2U=@lenny.ninja>
DKIM signature
pass
Download raw message
Hey,

recently this error started showing up on my instance. Version: 2023-05-21


This is what I see in the logs:

GET /@ftrain/big-data-small-effort-b62607a43a8c ▸ Handled by fallback Articles::Show
 ▸ Performing request
Failed to raise an exception: END_OF_STACK
[0x43cd06] ???
[0x40471b] ???
[0x433104] ???
[0x414656] ???
[0x92758e] ???

Tried to raise:: Unknown DW_FORM_data16 (Exception)
  from /usr/share/crystal/src/crystal/dwarf/info.cr:153:11 in '??'
  from /usr/share/crystal/src/crystal/dwarf/info.cr:67:23 in '??'
  from /usr/share/crystal/src/exception/call_stack/elf.cr:10:7 in '??'
  from src/ldso/dl_iterate_phdr.c:45:1 in '??'




Any idea what could be going wrong and how to fix it?
Details
Message ID
<CDE1BF43-4D71-4B52-901C-61F30A7A9D9A@edwardloveall.com>
In-Reply-To
<Y9A14doLQ-xjx4rejK-aCR5c9-3DEddNt5uAHAep908xTLg_rVfgTydzXX0u-exvKyp-wLdZpq4eh0ju_lU9hLDGDMDS8VksVHM423eUM2U=@lenny.ninja> (view parent)
DKIM signature
pass
Download raw message
Interesting. The main scribe instance (scribe.rip) doesn't see this bug, so I assume you're probably deploying differently than I am. Can you tell me a little more about your environment?

If you're using docker I found a thread that looks pretty similar and may be helpful to you: https://forum.crystal-lang.org/t/help-with-static-build/4936

Edward

On 28 May 2023, at 11:10, Lenny wrote:

> Hey,
>
> recently this error started showing up on my instance. Version: 2023-05-21
>
>
> This is what I see in the logs:
>
> GET /@ftrain/big-data-small-effort-b62607a43a8c ▸ Handled by fallback Articles::Show
>  ▸ Performing request
> Failed to raise an exception: END_OF_STACK
> [0x43cd06] ???
> [0x40471b] ???
> [0x433104] ???
> [0x414656] ???
> [0x92758e] ???
>
> Tried to raise:: Unknown DW_FORM_data16 (Exception)
>   from /usr/share/crystal/src/crystal/dwarf/info.cr:153:11 in '??'
>   from /usr/share/crystal/src/crystal/dwarf/info.cr:67:23 in '??'
>   from /usr/share/crystal/src/exception/call_stack/elf.cr:10:7 in '??'
>   from src/ldso/dl_iterate_phdr.c:45:1 in '??'
>
>
>
>
> Any idea what could be going wrong and how to fix it?
Details
Message ID
<Gu9zymeoOp5jx2LXKxXaF6Q-kchfDrRgv1Ci3P11vlIyBdnoAR30ll2hzSFTI4QpFw4hAyy9O-vs_L4GE3O0j0mXRpoTuZd1hQVNxvF-TbE=@lenny.ninja>
In-Reply-To
<CDE1BF43-4D71-4B52-901C-61F30A7A9D9A@edwardloveall.com> (view parent)
DKIM signature
pass
Download raw message
Hey, 

yea I'm basically building a docker image from the repo and then running that using an ansible role like this: 


---
- name: Clone repo
  git:
    repo: "https://git.sr.ht/~edwardloveall/scribe"
    dest: ./scribe/repo
    version: main
- name: Build scribe
  community.docker.docker_image:
    build:
      path: ./scribe/repo
      args:
        PUID: 1000
        PGUID: 1000
    name: scribe
    tag: latest
    source: build

- name: Create scribe container
  become: yes
  become_user: root
  docker_container:
    image: scribe:latest
    name: scribe
    volumes:
      - "./scribe/config:/home/lucky/app/config"
    env:
      SCRIBE_PORT: "8080"
      SCRIBE_HOST: "0.0.0.0"
      SCRIBE_DB: "postgres://does@not/matter"

The issue you sent does look similar! All the issues referenced there seem patched. 

Looking at https://git.sr.ht/~edwardloveall/scribe/tree/main/item/Dockerfile#L12, it seems that the dockerfile uses a crystal version (1.5.0) from before https://github.com/crystal-lang/crystal/pull/12497 was merged. 


Would it be possible to upgrade the crystal version in the Dockerfile? I can see that https://git.sr.ht/~edwardloveall/scribe/tree/main/item/shard.yml#L11 already uses a later version! 



------- Original Message -------
On Monday, May 29th, 2023 at 6:37 PM, Edward Loveall <edward@edwardloveall.com> wrote:


> 

> 

> Interesting. The main scribe instance (scribe.rip) doesn't see this bug, so I assume you're probably deploying differently than I am. Can you tell me a little more about your environment?
> 

> If you're using docker I found a thread that looks pretty similar and may be helpful to you: https://forum.crystal-lang.org/t/help-with-static-build/4936
> 

> Edward
> 

> On 28 May 2023, at 11:10, Lenny wrote:
> 

> > Hey,
> > 

> > recently this error started showing up on my instance. Version: 2023-05-21
> > 

> > This is what I see in the logs:
> > 

> > GET /@ftrain/big-data-small-effort-b62607a43a8c ▸ Handled by fallback Articles::Show
> > ▸ Performing request
> > Failed to raise an exception: END_OF_STACK
> > [0x43cd06] ???
> > [0x40471b] ???
> > [0x433104] ???
> > [0x414656] ???
> > [0x92758e] ???
> > 

> > Tried to raise:: Unknown DW_FORM_data16 (Exception)
> > from /usr/share/crystal/src/crystal/dwarf/info.cr:153:11 in '??'
> > from /usr/share/crystal/src/crystal/dwarf/info.cr:67:23 in '??'
> > from /usr/share/crystal/src/exception/call_stack/elf.cr:10:7 in '??'
> > from src/ldso/dl_iterate_phdr.c:45:1 in '??'
> > 

> > Any idea what could be going wrong and how to fix it?
Details
Message ID
<7753D9EF-7BBD-458C-BBBD-177BE17A9035@edwardloveall.com>
In-Reply-To
<Gu9zymeoOp5jx2LXKxXaF6Q-kchfDrRgv1Ci3P11vlIyBdnoAR30ll2hzSFTI4QpFw4hAyy9O-vs_L4GE3O0j0mXRpoTuZd1hQVNxvF-TbE=@lenny.ninja> (view parent)
DKIM signature
pass
Download raw message
Alright, I updated it and pushed to a branch: el-docker-crystal-update

It built/ran for me locally, but can you give it a try to make sure it's not just me?

Edward

On 29 May 2023, at 15:29, Lenny wrote:

> Hey,
>
> yea I'm basically building a docker image from the repo and then running that using an ansible role like this:
>
>
> ---
> - name: Clone repo
>   git:
>     repo: "https://git.sr.ht/~edwardloveall/scribe"
>     dest: ./scribe/repo
>     version: main
> - name: Build scribe
>   community.docker.docker_image:
>     build:
>       path: ./scribe/repo
>       args:
>         PUID: 1000
>         PGUID: 1000
>     name: scribe
>     tag: latest
>     source: build
>
> - name: Create scribe container
>   become: yes
>   become_user: root
>   docker_container:
>     image: scribe:latest
>     name: scribe
>     volumes:
>       - "./scribe/config:/home/lucky/app/config"
>     env:
>       SCRIBE_PORT: "8080"
>       SCRIBE_HOST: "0.0.0.0"
>       SCRIBE_DB: "postgres://does@not/matter"
>
> The issue you sent does look similar! All the issues referenced there seem patched.
>
> Looking at https://git.sr.ht/~edwardloveall/scribe/tree/main/item/Dockerfile#L12, it seems that the dockerfile uses a crystal version (1.5.0) from before https://github.com/crystal-lang/crystal/pull/12497 was merged.
>
>
> Would it be possible to upgrade the crystal version in the Dockerfile? I can see that https://git.sr.ht/~edwardloveall/scribe/tree/main/item/shard.yml#L11 already uses a later version!
>
>
>
> ------- Original Message -------
> On Monday, May 29th, 2023 at 6:37 PM, Edward Loveall <edward@edwardloveall.com> wrote:
>
>
>>
>
>>
>
>> Interesting. The main scribe instance (scribe.rip) doesn't see this bug, so I assume you're probably deploying differently than I am. Can you tell me a little more about your environment?
>>
>
>> If you're using docker I found a thread that looks pretty similar and may be helpful to you: https://forum.crystal-lang.org/t/help-with-static-build/4936
>>
>
>> Edward
>>
>
>> On 28 May 2023, at 11:10, Lenny wrote:
>>
>
>>> Hey,
>>>
>
>>> recently this error started showing up on my instance. Version: 2023-05-21
>>>
>
>>> This is what I see in the logs:
>>>
>
>>> GET /@ftrain/big-data-small-effort-b62607a43a8c ▸ Handled by fallback Articles::Show
>>> ▸ Performing request
>>> Failed to raise an exception: END_OF_STACK
>>> [0x43cd06] ???
>>> [0x40471b] ???
>>> [0x433104] ???
>>> [0x414656] ???
>>> [0x92758e] ???
>>>
>
>>> Tried to raise:: Unknown DW_FORM_data16 (Exception)
>>> from /usr/share/crystal/src/crystal/dwarf/info.cr:153:11 in '??'
>>> from /usr/share/crystal/src/crystal/dwarf/info.cr:67:23 in '??'
>>> from /usr/share/crystal/src/exception/call_stack/elf.cr:10:7 in '??'
>>> from src/ldso/dl_iterate_phdr.c:45:1 in '??'
>>>
>
>>> Any idea what could be going wrong and how to fix it?
Details
Message ID
<1x0x5NZ7yZPJgGTRaUeG2DyKoP6qdeNjpimR1TJ_tVfinhU4pEwgTG-fQtunQicBQvyx3RIZZPu8Oic00ri4pFD9PwuBAQevG2f4yiwp26Y=@lenny.ninja>
In-Reply-To
<7753D9EF-7BBD-458C-BBBD-177BE17A9035@edwardloveall.com> (view parent)
DKIM signature
pass
Download raw message
With that branch I'm getting this different error now:

GET /@ftrain/big-data-small-effort-b62607a43a8c
 ▸ Handled by fallback Articles::Show
 ▸ Performing request
 ▸  JSON::ParseException

     Unexpected char '<' at line 1, column 1

    Backtrace

     /usr/share/crystal/src/json/lexer.cr:331:5 in 'raise'
     /usr/share/crystal/src/json/lexer.cr:327:5 in 'unexpected_char'
     /usr/share/crystal/src/json/lexer.cr:326:11 in 'unexpected_char'
     /usr/share/crystal/src/json/lexer.cr:243:10 in 'consume_number'
     /usr/share/crystal/src/json/lexer.cr:63:7 in 'next_token'
     /usr/share/crystal/src/json/pull_parser.cr:649:5 in 'next_token'
     /usr/share/crystal/src/json/pull_parser.cr:109:5 in 'initialize'
     /usr/share/crystal/src/json/pull_parser.cr:99:3 in 'new'
     /usr/share/crystal/src/json/from_json.cr:12:3 in 'from_json'
     /tmp_build/src/clients/medium_client.cr:7:5 in 'post_data'
     /tmp_build/src/actions/articles/show.cr:4:3 in 'call'
     /tmp_build/lib/lucky/src/lucky/renderable.cr:136:16 in 'perform_action'
     /tmp_build/lib/lucky/src/lucky/route_not_found_handler.cr:15:7 in 'call'
     /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
     /usr/share/crystal/src/http/server/handlers/static_file_handler.cr:80:12 in 'call'
     /tmp_build/lib/lucky/src/charms/static_file_handler.cr:5:5 in 'call'
     /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
     /tmp_build/lib/lucky/src/lucky/static_compression_handler.cr:30:7 in 'call'
     /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
     /tmp_build/lib/lucky/src/lucky/route_handler.cr:12:7 in 'call'
     /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
     /tmp_build/lib/lucky/src/lucky/remote_ip_handler.cr:26:5 in 'call'
     /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
     /tmp_build/lib/lucky/src/lucky/error_handler.cr:14:5 in 'call'
     /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
     /tmp_build/lib/lucky/src/lucky/log_handler.cr:34:9 in 'call'
     /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
     /tmp_build/lib/lucky/src/lucky/http_method_override_handler.cr:11:5 in 'call'
     /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
     /tmp_build/lib/lucky/src/lucky/force_ssl_handler.cr:37:7 in 'call'
     /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
     /tmp_build/lib/lucky/src/lucky/request_id_handler.cr:24:5 in 'call'
     /usr/share/crystal/src/http/server/request_processor.cr:51:11 in 'process'
     /usr/share/crystal/src/http/server.cr:517:5 in 'handle_client'
     /usr/share/crystal/src/http/server.cr:470:13 in '->'
     /usr/share/crystal/src/fiber.cr:146:11 in 'run'
     /usr/share/crystal/src/fiber.cr:98:34 in '->'
     ???

 ▸ Sent 500 Internal Server Error (184.28ms)


------- Original Message -------
On Monday, May 29th, 2023 at 10:14 PM, Edward Loveall <edward@edwardloveall.com> wrote:


> 

> 

> Alright, I updated it and pushed to a branch: el-docker-crystal-update
> 

> It built/ran for me locally, but can you give it a try to make sure it's not just me?
> 

> Edward
> 

> On 29 May 2023, at 15:29, Lenny wrote:
> 

> > Hey,
> > 

> > yea I'm basically building a docker image from the repo and then running that using an ansible role like this:
> > 

> > ---
> > - name: Clone repo
> > git:
> > repo: "https://git.sr.ht/~edwardloveall/scribe"
> > dest: ./scribe/repo
> > version: main
> > - name: Build scribe
> > community.docker.docker_image:
> > build:
> > path: ./scribe/repo
> > args:
> > PUID: 1000
> > PGUID: 1000
> > name: scribe
> > tag: latest
> > source: build
> > 

> > - name: Create scribe container
> > become: yes
> > become_user: root
> > docker_container:
> > image: scribe:latest
> > name: scribe
> > volumes:
> > - "./scribe/config:/home/lucky/app/config"
> > env:
> > SCRIBE_PORT: "8080"
> > SCRIBE_HOST: "0.0.0.0"
> > SCRIBE_DB: "postgres://does@not/matter"
> > 

> > The issue you sent does look similar! All the issues referenced there seem patched.
> > 

> > Looking at https://git.sr.ht/~edwardloveall/scribe/tree/main/item/Dockerfile#L12, it seems that the dockerfile uses a crystal version (1.5.0) from before https://github.com/crystal-lang/crystal/pull/12497 was merged.
> > 

> > Would it be possible to upgrade the crystal version in the Dockerfile? I can see that https://git.sr.ht/~edwardloveall/scribe/tree/main/item/shard.yml#L11 already uses a later version!
> > 

> > ------- Original Message -------
> > On Monday, May 29th, 2023 at 6:37 PM, Edward Loveall edward@edwardloveall.com wrote:
> > 

> > > Interesting. The main scribe instance (scribe.rip) doesn't see this bug, so I assume you're probably deploying differently than I am. Can you tell me a little more about your environment?
> > 

> > > If you're using docker I found a thread that looks pretty similar and may be helpful to you: https://forum.crystal-lang.org/t/help-with-static-build/4936
> > 

> > > Edward
> > 

> > > On 28 May 2023, at 11:10, Lenny wrote:
> > 

> > > > Hey,
> > 

> > > > recently this error started showing up on my instance. Version: 2023-05-21
> > 

> > > > This is what I see in the logs:
> > 

> > > > GET /@ftrain/big-data-small-effort-b62607a43a8c ▸ Handled by fallback Articles::Show
> > > > ▸ Performing request
> > > > Failed to raise an exception: END_OF_STACK
> > > > [0x43cd06] ???
> > > > [0x40471b] ???
> > > > [0x433104] ???
> > > > [0x414656] ???
> > > > [0x92758e] ???
> > 

> > > > Tried to raise:: Unknown DW_FORM_data16 (Exception)
> > > > from /usr/share/crystal/src/crystal/dwarf/info.cr:153:11 in '??'
> > > > from /usr/share/crystal/src/crystal/dwarf/info.cr:67:23 in '??'
> > > > from /usr/share/crystal/src/exception/call_stack/elf.cr:10:7 in '??'
> > > > from src/ldso/dl_iterate_phdr.c:45:1 in '??'
> > 

> > > > Any idea what could be going wrong and how to fix it?
Details
Message ID
<5A73EF02-2698-401B-85F5-DA47705372CC@edwardloveall.com>
In-Reply-To
<1x0x5NZ7yZPJgGTRaUeG2DyKoP6qdeNjpimR1TJ_tVfinhU4pEwgTG-fQtunQicBQvyx3RIZZPu8Oic00ri4pFD9PwuBAQevG2f4yiwp26Y=@lenny.ninja> (view parent)
DKIM signature
pass
Download raw message
Hmmmm... That error looks like it's trying to parse an HTML response (that starts with `<`) as JSON. It's working over here on my end so I it's not on Medium's side.

Maybe it's blocking your network access? Can you try to make a similar request from inside the docker container? Here's the curl equivalent:

```
curl -X "POST" "https://medium.com/_/graphql" \
     -H 'Accept: application/json' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
	"query": "query{post(id:\\"b62607a43a8c\\"){title createdAt creator{id name}content{bodyModel{paragraphs{name text type href layout markups{title type href userId start end anchorType}iframe{mediaResource{href iframeSrc iframeWidth iframeHeight}}metadata{id originalWidth originalHeight}}}}}}",
	"variables": {}
}'
```

If that returns JSON, then that's a big mystery to me. If it returns HTML, maybe that will have some more info.

Edward

On 30 May 2023, at 14:55, Lenny wrote:

> With that branch I'm getting this different error now:
>
> GET /@ftrain/big-data-small-effort-b62607a43a8c
>  ▸ Handled by fallback Articles::Show
>  ▸ Performing request
>  ▸  JSON::ParseException
>
>      Unexpected char '<' at line 1, column 1
>
>     Backtrace
>
>      /usr/share/crystal/src/json/lexer.cr:331:5 in 'raise'
>      /usr/share/crystal/src/json/lexer.cr:327:5 in 'unexpected_char'
>      /usr/share/crystal/src/json/lexer.cr:326:11 in 'unexpected_char'
>      /usr/share/crystal/src/json/lexer.cr:243:10 in 'consume_number'
>      /usr/share/crystal/src/json/lexer.cr:63:7 in 'next_token'
>      /usr/share/crystal/src/json/pull_parser.cr:649:5 in 'next_token'
>      /usr/share/crystal/src/json/pull_parser.cr:109:5 in 'initialize'
>      /usr/share/crystal/src/json/pull_parser.cr:99:3 in 'new'
>      /usr/share/crystal/src/json/from_json.cr:12:3 in 'from_json'
>      /tmp_build/src/clients/medium_client.cr:7:5 in 'post_data'
>      /tmp_build/src/actions/articles/show.cr:4:3 in 'call'
>      /tmp_build/lib/lucky/src/lucky/renderable.cr:136:16 in 'perform_action'
>      /tmp_build/lib/lucky/src/lucky/route_not_found_handler.cr:15:7 in 'call'
>      /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
>      /usr/share/crystal/src/http/server/handlers/static_file_handler.cr:80:12 in 'call'
>      /tmp_build/lib/lucky/src/charms/static_file_handler.cr:5:5 in 'call'
>      /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
>      /tmp_build/lib/lucky/src/lucky/static_compression_handler.cr:30:7 in 'call'
>      /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
>      /tmp_build/lib/lucky/src/lucky/route_handler.cr:12:7 in 'call'
>      /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
>      /tmp_build/lib/lucky/src/lucky/remote_ip_handler.cr:26:5 in 'call'
>      /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
>      /tmp_build/lib/lucky/src/lucky/error_handler.cr:14:5 in 'call'
>      /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
>      /tmp_build/lib/lucky/src/lucky/log_handler.cr:34:9 in 'call'
>      /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
>      /tmp_build/lib/lucky/src/lucky/http_method_override_handler.cr:11:5 in 'call'
>      /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
>      /tmp_build/lib/lucky/src/lucky/force_ssl_handler.cr:37:7 in 'call'
>      /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
>      /tmp_build/lib/lucky/src/lucky/request_id_handler.cr:24:5 in 'call'
>      /usr/share/crystal/src/http/server/request_processor.cr:51:11 in 'process'
>      /usr/share/crystal/src/http/server.cr:517:5 in 'handle_client'
>      /usr/share/crystal/src/http/server.cr:470:13 in '->'
>      /usr/share/crystal/src/fiber.cr:146:11 in 'run'
>      /usr/share/crystal/src/fiber.cr:98:34 in '->'
>      ???
>
>  ▸ Sent 500 Internal Server Error (184.28ms)
>
>
> ------- Original Message -------
> On Monday, May 29th, 2023 at 10:14 PM, Edward Loveall <edward@edwardloveall.com> wrote:
>
>
>>
>
>>
>
>> Alright, I updated it and pushed to a branch: el-docker-crystal-update
>>
>
>> It built/ran for me locally, but can you give it a try to make sure it's not just me?
>>
>
>> Edward
>>
>
>> On 29 May 2023, at 15:29, Lenny wrote:
>>
>
>>> Hey,
>>>
>
>>> yea I'm basically building a docker image from the repo and then running that using an ansible role like this:
>>>
>
>>> ---
>>> - name: Clone repo
>>> git:
>>> repo: "https://git.sr.ht/~edwardloveall/scribe"
>>> dest: ./scribe/repo
>>> version: main
>>> - name: Build scribe
>>> community.docker.docker_image:
>>> build:
>>> path: ./scribe/repo
>>> args:
>>> PUID: 1000
>>> PGUID: 1000
>>> name: scribe
>>> tag: latest
>>> source: build
>>>
>
>>> - name: Create scribe container
>>> become: yes
>>> become_user: root
>>> docker_container:
>>> image: scribe:latest
>>> name: scribe
>>> volumes:
>>> - "./scribe/config:/home/lucky/app/config"
>>> env:
>>> SCRIBE_PORT: "8080"
>>> SCRIBE_HOST: "0.0.0.0"
>>> SCRIBE_DB: "postgres://does@not/matter"
>>>
>
>>> The issue you sent does look similar! All the issues referenced there seem patched.
>>>
>
>>> Looking at https://git.sr.ht/~edwardloveall/scribe/tree/main/item/Dockerfile#L12, it seems that the dockerfile uses a crystal version (1.5.0) from before https://github.com/crystal-lang/crystal/pull/12497 was merged.
>>>
>
>>> Would it be possible to upgrade the crystal version in the Dockerfile? I can see that https://git.sr.ht/~edwardloveall/scribe/tree/main/item/shard.yml#L11 already uses a later version!
>>>
>
>>> ------- Original Message -------
>>> On Monday, May 29th, 2023 at 6:37 PM, Edward Loveall edward@edwardloveall.com wrote:
>>>
>
>>>> Interesting. The main scribe instance (scribe.rip) doesn't see this bug, so I assume you're probably deploying differently than I am. Can you tell me a little more about your environment?
>>>
>
>>>> If you're using docker I found a thread that looks pretty similar and may be helpful to you: https://forum.crystal-lang.org/t/help-with-static-build/4936
>>>
>
>>>> Edward
>>>
>
>>>> On 28 May 2023, at 11:10, Lenny wrote:
>>>
>
>>>>> Hey,
>>>
>
>>>>> recently this error started showing up on my instance. Version: 2023-05-21
>>>
>
>>>>> This is what I see in the logs:
>>>
>
>>>>> GET /@ftrain/big-data-small-effort-b62607a43a8c ▸ Handled by fallback Articles::Show
>>>>> ▸ Performing request
>>>>> Failed to raise an exception: END_OF_STACK
>>>>> [0x43cd06] ???
>>>>> [0x40471b] ???
>>>>> [0x433104] ???
>>>>> [0x414656] ???
>>>>> [0x92758e] ???
>>>
>
>>>>> Tried to raise:: Unknown DW_FORM_data16 (Exception)
>>>>> from /usr/share/crystal/src/crystal/dwarf/info.cr:153:11 in '??'
>>>>> from /usr/share/crystal/src/crystal/dwarf/info.cr:67:23 in '??'
>>>>> from /usr/share/crystal/src/exception/call_stack/elf.cr:10:7 in '??'
>>>>> from src/ldso/dl_iterate_phdr.c:45:1 in '??'
>>>
>
>>>>> Any idea what could be going wrong and how to fix it?
Details
Message ID
<aWuh9Mmsj5HECeGhae-sILdVc_REEw8AJ6QCBlonWHGMvEfiVE6a9TKWz1FN5GveWewtLpsHwxr7_fGSh_3mN10lx5Pb1eU6mOWR9Alo3dA=@lenny.ninja>
In-Reply-To
<5A73EF02-2698-401B-85F5-DA47705372CC@edwardloveall.com> (view parent)
DKIM signature
pass
Download raw message
Sorry for the late reply, here is the result of running that command. It properly returns HTML.

```
/home/lucky/app # curl -X "POST" "https://medium.com/_/graphql" \
>      -H 'Accept: application/json' \
>      -H 'Content-Type: application/json; charset=utf-8' \
>      -d $'{
> "query": "query{post(id:\\"b62607a43a8c\\"){title createdAt creator{id name}content{bodyModel{paragraphs{name text type href layout markups{title type href userId start end anchorType}iframe{mediaResource{href iframeSrc iframeWidth iframeHeight}}metada
ta{id originalWidth originalHeight}}}}}}",
> "variables": {}
> }'
<!DOCTYPE html>
<html lang="en-US">
<head>
    <title>Just a moment...</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="robots" content="noindex,nofollow">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <link href="/cdn-cgi/styles/challenges.css" rel="stylesheet">
    <meta http-equiv="refresh" content="35">

</head>
<body class="no-js">
    <div class="main-wrapper" role="main">
    <div class="main-content">
        <noscript>
            <div id="challenge-error-title">
                <div class="h2">
                    <span class="icon-wrapper">
                        <div class="heading-icon warning-icon"></div>
                    </span>
                    <span id="challenge-error-text">
                        Enable JavaScript and cookies to continue
                    </span>
                </div>
            </div>
        </noscript>
        <form id="challenge-form" action="/_/graphql?__cf_chl_f_tk=KH_lCohPkcH74Y57ud0nvB5mQaFFPEyVyoH93VfhSOw-1689109923-0-gaNycGzNCxA" method="POST" enctype="application/x-www-form-urlencoded">
            <input type="hidden" name="md" value="rHo0w7Y68IalaZdu25G_7LJXTS4Mm8NRK8xKJY_gUag-1689109923-0-AZXeNd4SveC2axRIQ1pgK9ysRJJHdU3ZeYFI1mTojjE4EGyF760AW7d53j7TP9ZHT-F95B90dzudrzo_r5xu9q1ZHiG2qtKbzq-gEQX6zyaNAoE9owfphon_uNd1eepG5yrMQyKhcAA547SUuXRg5FxDyFgdXLXKPokhI_EOhPzcSX_RF5EUKkb6wH3MZoUzQ-MdzpuP2mKXLKWf1BxXNPFE38tgxrFaVYhq-jz3OdEQNnFBYNoDQrVBmLe4VEhWR4F4S7hgo0J77kLOSSU1JIOq5JWbgXl6r4ZxSKpvR-DYgZmLKJPekiRA5dJofT4qsgT36TIDAlGkTpdGwezSa3DUKX99IV6_VBTseICzOi6zQz-Bq26kfj6rsPp-SoJDpnvoJh3noY3cyYl1N0Ti50oYNsV0oVnhPDrEQNAg9sb5g4_jTUQDmHcA0AlnES3L0Ymmd1Z8LKdorU2zj0m1VhA8ho5d1Y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rlKcLewy37g5hYzO8WslU15swmxDF-Dc4rwHizbtjrZ3xuOvT3yvFkLa0r014g8XdaRcVbHCW242D-RHOs6jePtzn8Rqt8FDHiv3R-hlrmqWYJogaXUL_d9w9tEVoODuCLQgpJac8iKQvVgfQ8">
        </form>
    </div>
</div>
<script>
    (function(){
        window._cf_chl_opt={
            cvId: '2',
            cZone: 'medium.com',
            cType: 'non-interactive',
            cNounce: '91794',
            cRay: '7e540adc1d1135f9',
            cHash: 'b5380e69dfca779',
            cUPMDTk: "\/_\/graphql?__cf_chl_tk=KH_lCohPkcH74Y57ud0nvB5mQaFFPEyVyoH93VfhSOw-1689109923-0-gaNycGzNCxA",
            cFPWv: 'b',
            cTTimeMs: '1000',
            cMTimeMs: '60000',
            cTplV: 5,
            cTplB: 'cf',
            cK: "",
            cRq: {
                ru: 'aHR0cHM6Ly9tZWRpdW0uY29tL18vZ3JhcGhxbA==',
                ra: 'Y3VybC84LjEuMg==',
                rm: 'UE9TVA==',
                d: 'DLD4mBBUOe/33Ln9Mq7mXUn+mOCxv3RUrnYsC/Bp2bPttVM6SAXqOsoLz93HAomqr8UaxKdLcTePvwr+rtz4SY5fRPsZeJC9z8SqAUtFc8uT0BJLIcDzLAp/IMnfS3cZc0kyJd788u21+meAZzZe3SICvyRJ9FzHapNK7OSC3thJH95QejGhuMOr8IMPez5bRfe9LQ+tvCjYAlml9TeuVzyCW7tgK7LyTdIExrqmSz2Xc6GJdMm2ft/E2jO6wtyctc6BzeAWMIeMPKAdiD2y38vx+2KHcXDwTlaxUfo171ARJwEPBOdFwc0veHgDASWv/Hn4++qXZXNwACExLhQg+bq98xr6gW35ldvqQVhTq7DFAY8SdgRJ+ildR76FCahjja+5I8VYJ4tIZoNkKYxa8uKqlU1mi0mUCQMIgWtNq6418BFGoIUCl/vG3008j9XI4wqlUSCAcMwgG5VZWOtQjOs8tVo5xyadlEP4va0eGwFxCPNBB2lD3lr1bSlbKlskXH083HAcy/JhnPNsEiqU4OqwyVEXZcSL/sFNFiI6rvo=',
                t: 'MTY4OTEwOTkyMy4yMzAwMDA=',
                cT: Math.floor(Date.now() / 1000),
                m: '8Q7BxfrUYiNxToDjCwX++Sfh4FZTPd419VZUHFYFDV4=',
                i1: 'eFRxtRKK8TgaTFik5YkxUQ==',
                i2: 'OZ4CBx4Zzln/Nnqj4++TTA==',
                zh: 'Ycgpu9r177LxjbQGFsmz/e0ei9K/7m7t1CDoKCYIB7I=',
                uh: 'i9CEYhU4ty6SEGJWWzmH4LAP4jo+NATPTiUzH3IEBBM=',
                hh: 'YvLLNAANQRqbdRleAht8yWR4w9yWVhTbCiWB1al3UhY=',
            }
        };
        var cpo = document.createElement('script');
        cpo.src = '/cdn-cgi/challenge-platform/h/b/orchestrate/jsch/v1?ray=7e540adc1d1135f9';
        window._cf_chl_opt.cOgUHash = location.hash === '' && location.href.indexOf('#') !== -1 ? '#' : location.hash;
        window._cf_chl_opt.cOgUQuery = location.search === '' && location.href.slice(0, location.href.length - window._cf_chl_opt.cOgUHash.length).indexOf('?') !== -1 ? '?' : location.search;
        if (window.history && window.history.replaceState) {
            var ogU = location.pathname + window._cf_chl_opt.cOgUQuery + window._cf_chl_opt.cOgUHash;
            history.replaceState(null, null, "\/_\/graphql?__cf_chl_rt_tk=KH_lCohPkcH74Y57ud0nvB5mQaFFPEyVyoH93VfhSOw-1689109923-0-gaNycGzNCxA" + window._cf_chl_opt.cOgUHash);
            cpo.onload = function() {
                history.replaceState(null, null, ogU);
            };
        }
        document.getElementsByTagName('head')[0].appendChild(cpo);
    }());
</script>


</body>
</html>
```




------- Original Message -------
On Thursday, June 1st, 2023 at 1:30 AM, Edward Loveall <edward@edwardloveall.com> wrote:


> 

> 

> Hmmmm... That error looks like it's trying to parse an HTML response (that starts with `<`) as JSON. It's working over here on my end so I it's not on Medium's side.
> 

> Maybe it's blocking your network access? Can you try to make a similar request from inside the docker container? Here's the curl equivalent:
> 

> `curl -X "POST" "https://medium.com/_/graphql" \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json; charset=utf-8' \\ -d $'{ "query": "query{post(id:\\\\"b62607a43a8c\\\\"){title createdAt creator{id name}content{bodyModel{paragraphs{name text type href layout markups{title type href userId start end anchorType}iframe{mediaResource{href iframeSrc iframeWidth iframeHeight}}metadata{id originalWidth originalHeight}}}}}}", "variables": {} }'`
> 

> If that returns JSON, then that's a big mystery to me. If it returns HTML, maybe that will have some more info.
> 

> Edward
> 

> On 30 May 2023, at 14:55, Lenny wrote:
> 

> > With that branch I'm getting this different error now:
> > 

> > GET /@ftrain/big-data-small-effort-b62607a43a8c
> > ▸ Handled by fallback Articles::Show
> > ▸ Performing request
> > ▸ JSON::ParseException
> > 

> > Unexpected char '<' at line 1, column 1
> > 

> > Backtrace
> > 

> > /usr/share/crystal/src/json/lexer.cr:331:5 in 'raise'
> > /usr/share/crystal/src/json/lexer.cr:327:5 in 'unexpected_char'
> > /usr/share/crystal/src/json/lexer.cr:326:11 in 'unexpected_char'
> > /usr/share/crystal/src/json/lexer.cr:243:10 in 'consume_number'
> > /usr/share/crystal/src/json/lexer.cr:63:7 in 'next_token'
> > /usr/share/crystal/src/json/pull_parser.cr:649:5 in 'next_token'
> > /usr/share/crystal/src/json/pull_parser.cr:109:5 in 'initialize'
> > /usr/share/crystal/src/json/pull_parser.cr:99:3 in 'new'
> > /usr/share/crystal/src/json/from_json.cr:12:3 in 'from_json'
> > /tmp_build/src/clients/medium_client.cr:7:5 in 'post_data'
> > /tmp_build/src/actions/articles/show.cr:4:3 in 'call'
> > /tmp_build/lib/lucky/src/lucky/renderable.cr:136:16 in 'perform_action'
> > /tmp_build/lib/lucky/src/lucky/route_not_found_handler.cr:15:7 in 'call'
> > /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
> > /usr/share/crystal/src/http/server/handlers/static_file_handler.cr:80:12 in 'call'
> > /tmp_build/lib/lucky/src/charms/static_file_handler.cr:5:5 in 'call'
> > /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
> > /tmp_build/lib/lucky/src/lucky/static_compression_handler.cr:30:7 in 'call'
> > /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
> > /tmp_build/lib/lucky/src/lucky/route_handler.cr:12:7 in 'call'
> > /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
> > /tmp_build/lib/lucky/src/lucky/remote_ip_handler.cr:26:5 in 'call'
> > /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
> > /tmp_build/lib/lucky/src/lucky/error_handler.cr:14:5 in 'call'
> > /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
> > /tmp_build/lib/lucky/src/lucky/log_handler.cr:34:9 in 'call'
> > /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
> > /tmp_build/lib/lucky/src/lucky/http_method_override_handler.cr:11:5 in 'call'
> > /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
> > /tmp_build/lib/lucky/src/lucky/force_ssl_handler.cr:37:7 in 'call'
> > /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
> > /tmp_build/lib/lucky/src/lucky/request_id_handler.cr:24:5 in 'call'
> > /usr/share/crystal/src/http/server/request_processor.cr:51:11 in 'process'
> > /usr/share/crystal/src/http/server.cr:517:5 in 'handle_client'
> > /usr/share/crystal/src/http/server.cr:470:13 in '->'
> > /usr/share/crystal/src/fiber.cr:146:11 in 'run'
> > /usr/share/crystal/src/fiber.cr:98:34 in '->'
> > ???
> > 

> > ▸ Sent 500 Internal Server Error (184.28ms)
> > 

> > ------- Original Message -------
> > On Monday, May 29th, 2023 at 10:14 PM, Edward Loveall edward@edwardloveall.com wrote:
> > 

> > > Alright, I updated it and pushed to a branch: el-docker-crystal-update
> > 

> > > It built/ran for me locally, but can you give it a try to make sure it's not just me?
> > 

> > > Edward
> > 

> > > On 29 May 2023, at 15:29, Lenny wrote:
> > 

> > > > Hey,
> > 

> > > > yea I'm basically building a docker image from the repo and then running that using an ansible role like this:
> > 

> > > > ---
> > > > - name: Clone repo
> > > > git:
> > > > repo: "https://git.sr.ht/~edwardloveall/scribe"
> > > > dest: ./scribe/repo
> > > > version: main
> > > > - name: Build scribe
> > > > community.docker.docker_image:
> > > > build:
> > > > path: ./scribe/repo
> > > > args:
> > > > PUID: 1000
> > > > PGUID: 1000
> > > > name: scribe
> > > > tag: latest
> > > > source: build
> > 

> > > > - name: Create scribe container
> > > > become: yes
> > > > become_user: root
> > > > docker_container:
> > > > image: scribe:latest
> > > > name: scribe
> > > > volumes:
> > > > - "./scribe/config:/home/lucky/app/config"
> > > > env:
> > > > SCRIBE_PORT: "8080"
> > > > SCRIBE_HOST: "0.0.0.0"
> > > > SCRIBE_DB: "postgres://does@not/matter"
> > 

> > > > The issue you sent does look similar! All the issues referenced there seem patched.
> > 

> > > > Looking at https://git.sr.ht/~edwardloveall/scribe/tree/main/item/Dockerfile#L12, it seems that the dockerfile uses a crystal version (1.5.0) from before https://github.com/crystal-lang/crystal/pull/12497 was merged.
> > 

> > > > Would it be possible to upgrade the crystal version in the Dockerfile? I can see that https://git.sr.ht/~edwardloveall/scribe/tree/main/item/shard.yml#L11 already uses a later version!
> > 

> > > > ------- Original Message -------
> > > > On Monday, May 29th, 2023 at 6:37 PM, Edward Loveall edward@edwardloveall.com wrote:
> > 

> > > > > Interesting. The main scribe instance (scribe.rip) doesn't see this bug, so I assume you're probably deploying differently than I am. Can you tell me a little more about your environment?
> > 

> > > > > If you're using docker I found a thread that looks pretty similar and may be helpful to you: https://forum.crystal-lang.org/t/help-with-static-build/4936
> > 

> > > > > Edward
> > 

> > > > > On 28 May 2023, at 11:10, Lenny wrote:
> > 

> > > > > > Hey,
> > 

> > > > > > recently this error started showing up on my instance. Version: 2023-05-21
> > 

> > > > > > This is what I see in the logs:
> > 

> > > > > > GET /@ftrain/big-data-small-effort-b62607a43a8c ▸ Handled by fallback Articles::Show
> > > > > > ▸ Performing request
> > > > > > Failed to raise an exception: END_OF_STACK
> > > > > > [0x43cd06] ???
> > > > > > [0x40471b] ???
> > > > > > [0x433104] ???
> > > > > > [0x414656] ???
> > > > > > [0x92758e] ???
> > 

> > > > > > Tried to raise:: Unknown DW_FORM_data16 (Exception)
> > > > > > from /usr/share/crystal/src/crystal/dwarf/info.cr:153:11 in '??'
> > > > > > from /usr/share/crystal/src/crystal/dwarf/info.cr:67:23 in '??'
> > > > > > from /usr/share/crystal/src/exception/call_stack/elf.cr:10:7 in '??'
> > > > > > from src/ldso/dl_iterate_phdr.c:45:1 in '??'
> > 

> > > > > > Any idea what could be going wrong and how to fix it?
Details
Message ID
<55DE27EA-3B79-49C5-A037-E32BDA457D58@edwardloveall.com>
In-Reply-To
<aWuh9Mmsj5HECeGhae-sILdVc_REEw8AJ6QCBlonWHGMvEfiVE6a9TKWz1FN5GveWewtLpsHwxr7_fGSh_3mN10lx5Pb1eU6mOWR9Alo3dA=@lenny.ninja> (view parent)
DKIM signature
pass
Download raw message
Looking at the page, it looks like a cloudflare page. Like one of those "We're checking to see if you can access this page" pages. It looks that way because javascript embedded in the HTML response has "/cdn-cgi/challenge-platform" and if I search that I get links to [this cloudflare /cdn-cgi endpoint documentation](https://developers.cloudflare.com/fundamentals/get-started/reference/cdn-cgi-endpoint/).

I'm not sure exactly but it may be that cloudflare is blocking your server. If that's the case, I'm not sure what else I can do for you, unfortunately.

Also, you mention that your curl request "properly returns HTML". For clarity, I wanted to say that is should _not_ return HTML. It should return the JSON response of the graphql call. It's returning what we thought it might be in previous emails, but it's not correct. Sorry to jump on that if you knew that, but I wanted to make sure we were on the same page.

Edward

On 11 Jul 2023, at 17:13, Lenny wrote:

> Sorry for the late reply, here is the result of running that command. It properly returns HTML.
>
> ```
> /home/lucky/app # curl -X "POST" "https://medium.com/_/graphql" \
>>      -H 'Accept: application/json' \
>>      -H 'Content-Type: application/json; charset=utf-8' \
>>      -d $'{
>> "query": "query{post(id:\\"b62607a43a8c\\"){title createdAt creator{id name}content{bodyModel{paragraphs{name text type href layout markups{title type href userId start end anchorType}iframe{mediaResource{href iframeSrc iframeWidth iframeHeight}}metada
> ta{id originalWidth originalHeight}}}}}}",
>> "variables": {}
>> }'
> <!DOCTYPE html>
> <html lang="en-US">
> <head>
>     <title>Just a moment...</title>
>     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>     <meta http-equiv="X-UA-Compatible" content="IE=Edge">
>     <meta name="robots" content="noindex,nofollow">
>     <meta name="viewport" content="width=device-width,initial-scale=1">
>     <link href="/cdn-cgi/styles/challenges.css" rel="stylesheet">
>     <meta http-equiv="refresh" content="35">
>
> </head>
> <body class="no-js">
>     <div class="main-wrapper" role="main">
>     <div class="main-content">
>         <noscript>
>             <div id="challenge-error-title">
>                 <div class="h2">
>                     <span class="icon-wrapper">
>                         <div class="heading-icon warning-icon"></div>
>                     </span>
>                     <span id="challenge-error-text">
>                         Enable JavaScript and cookies to continue
>                     </span>
>                 </div>
>             </div>
>         </noscript>
>         <form id="challenge-form" action="/_/graphql?__cf_chl_f_tk=KH_lCohPkcH74Y57ud0nvB5mQaFFPEyVyoH93VfhSOw-1689109923-0-gaNycGzNCxA" method="POST" enctype="application/x-www-form-urlencoded">
>             <input type="hidden" name="md" value="rHo0w7Y68IalaZdu25G_7LJXTS4Mm8NRK8xKJY_gUag-1689109923-0-AZXeNd4SveC2axRIQ1pgK9ysRJJHdU3ZeYFI1mTojjE4EGyF760AW7d53j7TP9ZHT-F95B90dzudrzo_r5xu9q1ZHiG2qtKbzq-gEQX6zyaNAoE9owfphon_uNd1eepG5yrMQyKhcAA547SUuXRg5FxDyFgdXLXKPokhI_EOhPzcSX_RF5EUKkb6wH3MZoUzQ-MdzpuP2mKXLKWf1BxXNPFE38tgxrFaVYhq-jz3OdEQNnFBYNoDQrVBmLe4VEhWR4F4S7hgo0J77kLOSSU1JIOq5JWbgXl6r4ZxSKpvR-DYgZmLKJPekiRA5dJofT4qsgT36TIDAlGkTpdGwezSa3DUKX99IV6_VBTseICzOi6zQz-Bq26kfj6rsPp-SoJDpnvoJh3noY3cyYl1N0Ti50o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NCLbW11bLfnkuROG5tc1d6xUJMuHY0bUm_Q6HEECGNZwROYFdeqp5xPqsrVdVJx2IACK_sB3mW3rlKcLewy37g5hYzO8WslU15swmxDF-Dc4rwHizbtjrZ3xuOvT3yvFkLa0r014g8XdaRcVbHCW242D-RHOs6jePtzn8Rqt8FDHiv3R-hlrmqWYJogaXUL_d9w9tEVoODuCLQgpJac8iKQvVgfQ8">
>         </form>
>     </div>
> </div>
> <script>
>     (function(){
>         window._cf_chl_opt={
>             cvId: '2',
>             cZone: 'medium.com',
>             cType: 'non-interactive',
>             cNounce: '91794',
>             cRay: '7e540adc1d1135f9',
>             cHash: 'b5380e69dfca779',
>             cUPMDTk: "\/_\/graphql?__cf_chl_tk=KH_lCohPkcH74Y57ud0nvB5mQaFFPEyVyoH93VfhSOw-1689109923-0-gaNycGzNCxA",
>             cFPWv: 'b',
>             cTTimeMs: '1000',
>             cMTimeMs: '60000',
>             cTplV: 5,
>             cTplB: 'cf',
>             cK: "",
>             cRq: {
>                 ru: 'aHR0cHM6Ly9tZWRpdW0uY29tL18vZ3JhcGhxbA==',
>                 ra: 'Y3VybC84LjEuMg==',
>                 rm: 'UE9TVA==',
>                 d: 'DLD4mBBUOe/33Ln9Mq7mXUn+mOCxv3RUrnYsC/Bp2bPttVM6SAXqOsoLz93HAomqr8UaxKdLcTePvwr+rtz4SY5fRPsZeJC9z8SqAUtFc8uT0BJLIcDzLAp/IMnfS3cZc0kyJd788u21+meAZzZe3SICvyRJ9FzHapNK7OSC3thJH95QejGhuMOr8IMPez5bRfe9LQ+tvCjYAlml9TeuVzyCW7tgK7LyTdIExrqmSz2Xc6GJdMm2ft/E2jO6wtyctc6BzeAWMIeMPKAdiD2y38vx+2KHcXDwTlaxUfo171ARJwEPBOdFwc0veHgDASWv/Hn4++qXZXNwACExLhQg+bq98xr6gW35ldvqQVhTq7DFAY8SdgRJ+ildR76FCahjja+5I8VYJ4tIZoNkKYxa8uKqlU1mi0mUCQMIgWtNq6418BFGoIUCl/vG3008j9XI4wqlUSCAcMwgG5VZWOtQjOs8tVo5xyadlEP4va0eGwFxCPNBB2lD3lr1bSlbKlskXH083HAcy/JhnPNsEiqU4OqwyVEXZcSL/sFNFiI6rvo=',
>                 t: 'MTY4OTEwOTkyMy4yMzAwMDA=',
>                 cT: Math.floor(Date.now() / 1000),
>                 m: '8Q7BxfrUYiNxToDjCwX++Sfh4FZTPd419VZUHFYFDV4=',
>                 i1: 'eFRxtRKK8TgaTFik5YkxUQ==',
>                 i2: 'OZ4CBx4Zzln/Nnqj4++TTA==',
>                 zh: 'Ycgpu9r177LxjbQGFsmz/e0ei9K/7m7t1CDoKCYIB7I=',
>                 uh: 'i9CEYhU4ty6SEGJWWzmH4LAP4jo+NATPTiUzH3IEBBM=',
>                 hh: 'YvLLNAANQRqbdRleAht8yWR4w9yWVhTbCiWB1al3UhY=',
>             }
>         };
>         var cpo = document.createElement('script');
>         cpo.src = '/cdn-cgi/challenge-platform/h/b/orchestrate/jsch/v1?ray=7e540adc1d1135f9';
>         window._cf_chl_opt.cOgUHash = location.hash === '' && location.href.indexOf('#') !== -1 ? '#' : location.hash;
>         window._cf_chl_opt.cOgUQuery = location.search === '' && location.href.slice(0, location.href.length - window._cf_chl_opt.cOgUHash.length).indexOf('?') !== -1 ? '?' : location.search;
>         if (window.history && window.history.replaceState) {
>             var ogU = location.pathname + window._cf_chl_opt.cOgUQuery + window._cf_chl_opt.cOgUHash;
>             history.replaceState(null, null, "\/_\/graphql?__cf_chl_rt_tk=KH_lCohPkcH74Y57ud0nvB5mQaFFPEyVyoH93VfhSOw-1689109923-0-gaNycGzNCxA" + window._cf_chl_opt.cOgUHash);
>             cpo.onload = function() {
>                 history.replaceState(null, null, ogU);
>             };
>         }
>         document.getElementsByTagName('head')[0].appendChild(cpo);
>     }());
> </script>
>
>
> </body>
> </html>
> ```
>
>
>
>
> ------- Original Message -------
> On Thursday, June 1st, 2023 at 1:30 AM, Edward Loveall <edward@edwardloveall.com> wrote:
>
>
>>
>
>>
>
>> Hmmmm... That error looks like it's trying to parse an HTML response (that starts with `<`) as JSON. It's working over here on my end so I it's not on Medium's side.
>>
>
>> Maybe it's blocking your network access? Can you try to make a similar request from inside the docker container? Here's the curl equivalent:
>>
>
>> `curl -X "POST" "https://medium.com/_/graphql" \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json; charset=utf-8' \\ -d $'{ "query": "query{post(id:\\\\"b62607a43a8c\\\\"){title createdAt creator{id name}content{bodyModel{paragraphs{name text type href layout markups{title type href userId start end anchorType}iframe{mediaResource{href iframeSrc iframeWidth iframeHeight}}metadata{id originalWidth originalHeight}}}}}}", "variables": {} }'`
>>
>
>> If that returns JSON, then that's a big mystery to me. If it returns HTML, maybe that will have some more info.
>>
>
>> Edward
>>
>
>> On 30 May 2023, at 14:55, Lenny wrote:
>>
>
>>> With that branch I'm getting this different error now:
>>>
>
>>> GET /@ftrain/big-data-small-effort-b62607a43a8c
>>> ▸ Handled by fallback Articles::Show
>>> ▸ Performing request
>>> ▸ JSON::ParseException
>>>
>
>>> Unexpected char '<' at line 1, column 1
>>>
>
>>> Backtrace
>>>
>
>>> /usr/share/crystal/src/json/lexer.cr:331:5 in 'raise'
>>> /usr/share/crystal/src/json/lexer.cr:327:5 in 'unexpected_char'
>>> /usr/share/crystal/src/json/lexer.cr:326:11 in 'unexpected_char'
>>> /usr/share/crystal/src/json/lexer.cr:243:10 in 'consume_number'
>>> /usr/share/crystal/src/json/lexer.cr:63:7 in 'next_token'
>>> /usr/share/crystal/src/json/pull_parser.cr:649:5 in 'next_token'
>>> /usr/share/crystal/src/json/pull_parser.cr:109:5 in 'initialize'
>>> /usr/share/crystal/src/json/pull_parser.cr:99:3 in 'new'
>>> /usr/share/crystal/src/json/from_json.cr:12:3 in 'from_json'
>>> /tmp_build/src/clients/medium_client.cr:7:5 in 'post_data'
>>> /tmp_build/src/actions/articles/show.cr:4:3 in 'call'
>>> /tmp_build/lib/lucky/src/lucky/renderable.cr:136:16 in 'perform_action'
>>> /tmp_build/lib/lucky/src/lucky/route_not_found_handler.cr:15:7 in 'call'
>>> /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
>>> /usr/share/crystal/src/http/server/handlers/static_file_handler.cr:80:12 in 'call'
>>> /tmp_build/lib/lucky/src/charms/static_file_handler.cr:5:5 in 'call'
>>> /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
>>> /tmp_build/lib/lucky/src/lucky/static_compression_handler.cr:30:7 in 'call'
>>> /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
>>> /tmp_build/lib/lucky/src/lucky/route_handler.cr:12:7 in 'call'
>>> /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
>>> /tmp_build/lib/lucky/src/lucky/remote_ip_handler.cr:26:5 in 'call'
>>> /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
>>> /tmp_build/lib/lucky/src/lucky/error_handler.cr:14:5 in 'call'
>>> /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
>>> /tmp_build/lib/lucky/src/lucky/log_handler.cr:34:9 in 'call'
>>> /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
>>> /tmp_build/lib/lucky/src/lucky/http_method_override_handler.cr:11:5 in 'call'
>>> /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
>>> /tmp_build/lib/lucky/src/lucky/force_ssl_handler.cr:37:7 in 'call'
>>> /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
>>> /tmp_build/lib/lucky/src/lucky/request_id_handler.cr:24:5 in 'call'
>>> /usr/share/crystal/src/http/server/request_processor.cr:51:11 in 'process'
>>> /usr/share/crystal/src/http/server.cr:517:5 in 'handle_client'
>>> /usr/share/crystal/src/http/server.cr:470:13 in '->'
>>> /usr/share/crystal/src/fiber.cr:146:11 in 'run'
>>> /usr/share/crystal/src/fiber.cr:98:34 in '->'
>>> ???
>>>
>
>>> ▸ Sent 500 Internal Server Error (184.28ms)
>>>
>
>>> ------- Original Message -------
>>> On Monday, May 29th, 2023 at 10:14 PM, Edward Loveall edward@edwardloveall.com wrote:
>>>
>
>>>> Alright, I updated it and pushed to a branch: el-docker-crystal-update
>>>
>
>>>> It built/ran for me locally, but can you give it a try to make sure it's not just me?
>>>
>
>>>> Edward
>>>
>
>>>> On 29 May 2023, at 15:29, Lenny wrote:
>>>
>
>>>>> Hey,
>>>
>
>>>>> yea I'm basically building a docker image from the repo and then running that using an ansible role like this:
>>>
>
>>>>> ---
>>>>> - name: Clone repo
>>>>> git:
>>>>> repo: "https://git.sr.ht/~edwardloveall/scribe"
>>>>> dest: ./scribe/repo
>>>>> version: main
>>>>> - name: Build scribe
>>>>> community.docker.docker_image:
>>>>> build:
>>>>> path: ./scribe/repo
>>>>> args:
>>>>> PUID: 1000
>>>>> PGUID: 1000
>>>>> name: scribe
>>>>> tag: latest
>>>>> source: build
>>>
>
>>>>> - name: Create scribe container
>>>>> become: yes
>>>>> become_user: root
>>>>> docker_container:
>>>>> image: scribe:latest
>>>>> name: scribe
>>>>> volumes:
>>>>> - "./scribe/config:/home/lucky/app/config"
>>>>> env:
>>>>> SCRIBE_PORT: "8080"
>>>>> SCRIBE_HOST: "0.0.0.0"
>>>>> SCRIBE_DB: "postgres://does@not/matter"
>>>
>
>>>>> The issue you sent does look similar! All the issues referenced there seem patched.
>>>
>
>>>>> Looking at https://git.sr.ht/~edwardloveall/scribe/tree/main/item/Dockerfile#L12, it seems that the dockerfile uses a crystal version (1.5.0) from before https://github.com/crystal-lang/crystal/pull/12497 was merged.
>>>
>
>>>>> Would it be possible to upgrade the crystal version in the Dockerfile? I can see that https://git.sr.ht/~edwardloveall/scribe/tree/main/item/shard.yml#L11 already uses a later version!
>>>
>
>>>>> ------- Original Message -------
>>>>> On Monday, May 29th, 2023 at 6:37 PM, Edward Loveall edward@edwardloveall.com wrote:
>>>
>
>>>>>> Interesting. The main scribe instance (scribe.rip) doesn't see this bug, so I assume you're probably deploying differently than I am. Can you tell me a little more about your environment?
>>>
>
>>>>>> If you're using docker I found a thread that looks pretty similar and may be helpful to you: https://forum.crystal-lang.org/t/help-with-static-build/4936
>>>
>
>>>>>> Edward
>>>
>
>>>>>> On 28 May 2023, at 11:10, Lenny wrote:
>>>
>
>>>>>>> Hey,
>>>
>
>>>>>>> recently this error started showing up on my instance. Version: 2023-05-21
>>>
>
>>>>>>> This is what I see in the logs:
>>>
>
>>>>>>> GET /@ftrain/big-data-small-effort-b62607a43a8c ▸ Handled by fallback Articles::Show
>>>>>>> ▸ Performing request
>>>>>>> Failed to raise an exception: END_OF_STACK
>>>>>>> [0x43cd06] ???
>>>>>>> [0x40471b] ???
>>>>>>> [0x433104] ???
>>>>>>> [0x414656] ???
>>>>>>> [0x92758e] ???
>>>
>
>>>>>>> Tried to raise:: Unknown DW_FORM_data16 (Exception)
>>>>>>> from /usr/share/crystal/src/crystal/dwarf/info.cr:153:11 in '??'
>>>>>>> from /usr/share/crystal/src/crystal/dwarf/info.cr:67:23 in '??'
>>>>>>> from /usr/share/crystal/src/exception/call_stack/elf.cr:10:7 in '??'
>>>>>>> from src/ldso/dl_iterate_phdr.c:45:1 in '??'
>>>
>
>>>>>>> Any idea what could be going wrong and how to fix it?
Details
Message ID
<dWBzjtZj3tIPFl3hYZAWuwD0mUUaMuH35kQire4RDiRQx6QURUzpnZWtpHt27pM9JPWyxFXkbo3g7HP1iTVG826w5H2v04yjMg-55zmC9JQ=@lenny.ninja>
In-Reply-To
<55DE27EA-3B79-49C5-A037-E32BDA457D58@edwardloveall.com> (view parent)
DKIM signature
pass
Download raw message
Welp yea I guess its blocked. 


Thank you for the help. 





------- Original Message -------
On Tuesday, July 11th, 2023 at 11:37 PM, Edward Loveall <edward@edwardloveall.com> wrote:


> 

> 

> Looking at the page, it looks like a cloudflare page. Like one of those "We're checking to see if you can access this page" pages. It looks that way because javascript embedded in the HTML response has "/cdn-cgi/challenge-platform" and if I search that I get links to this cloudflare /cdn-cgi endpoint documentation.
> 

> I'm not sure exactly but it may be that cloudflare is blocking your server. If that's the case, I'm not sure what else I can do for you, unfortunately.
> 

> Also, you mention that your curl request "properly returns HTML". For clarity, I wanted to say that is should not return HTML. It should return the JSON response of the graphql call. It's returning what we thought it might be in previous emails, but it's not correct. Sorry to jump on that if you knew that, but I wanted to make sure we were on the same page.
> 

> Edward
> 

> On 11 Jul 2023, at 17:13, Lenny wrote:
> 

> > Sorry for the late reply, here is the result of running that command. It properly returns HTML.
> > 

> > ```
> > /home/lucky/app # curl -X "POST" "https://medium.com/_/graphql" \
> > 

> > > -H 'Accept: application/json' \
> > > -H 'Content-Type: application/json; charset=utf-8' \
> > > -d $'{
> > > "query": "query{post(id:\\"b62607a43a8c\\"){title createdAt creator{id name}content{bodyModel{paragraphs{name text type href layout markups{title type href userId start end anchorType}iframe{mediaResource{href iframeSrc iframeWidth iframeHeight}}metada
> > > ta{id originalWidth originalHeight}}}}}}",
> > > "variables": {}
> > > }'
> > > <!DOCTYPE html>
> > > <html lang="en-US">
> > > <head>
> > > <title>Just a moment...</title>
> > > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
> > > <meta http-equiv="X-UA-Compatible" content="IE=Edge">
> > > <meta name="robots" content="noindex,nofollow">
> > > <meta name="viewport" content="width=device-width,initial-scale=1">
> > > <link href="/cdn-cgi/styles/challenges.css" rel="stylesheet">
> > > <meta http-equiv="refresh" content="35">
> > 

> > </head>
> > <body class="no-js">
> > <div class="main-wrapper" role="main">
> > <div class="main-content">
> > <noscript>
> > <div id="challenge-error-title">
> > <div class="h2">
> > <span class="icon-wrapper">
> > <div class="heading-icon warning-icon"></div>
> > </span>
> > <span id="challenge-error-text">
> > Enable JavaScript and cookies to continue
> > </span>
> > </div>
> > </div>
> > </noscript>
> > <form id="challenge-form" action="/_/graphql?_cf_chl_f_tk=KH_lCohPkcH74Y57ud0nvB5mQaFFPEyVyoH93VfhSOw-1689109923-0-gaNycGzNCxA" method="POST" enctype="application/x-www-form-urlencoded">
> > <input type="hidden" name="md" value="rHo0w7Y68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5637GP2c66Sv6embJwevyHAn4eGkal2HH9lF-f2nCj-HOqSU8-ZRvpOyDd5EYQWQ1ZLvZgQH5PEVgmWmxSMrAkjUJ6fGQN99D3OynP3Du2a5N57x7MYOpd7gwYpgJAgOSmGrPWBd5kHYKMT3HPqVMjEa4I3aRSTTAMQBjjWx10H6vmbBxbqBkm3iq4TxuQIaRb4DqOvL39TrGeailyDKsS5wugpg7zsLjtap_B7pYaowVm2aYVe4Z6HNnnvdDAJ56iNY_yZ-ewoUbtM8FAFA5AjMDCz0jEVesWPYOrzWL2kIz7PuRCcuQRqZ6TluutH8vHtrmMWRe3hq9th3JSWGuUWcR4zOIvuauj3UivUpdGu5nHUigTxd7thYN3wGz3N_qS5lQ5aqbs7Ek0bbLtwnfJiPKbpa_hIb3SA9gcbs5_HeKjURG3LAyQEFWRNCLbW11bLfnkuROG5tc1d6xUJMuHY0bUm_Q6HEECGNZwROYFdeqp5xPqsrVdVJx2IACK_sB3mW3rlKcLewy37g5hYzO8WslU15swmxDF-Dc4rwHizbtjrZ3xuOvT3yvFkLa0r014g8XdaRcVbHCW242D-RHOs6jePtzn8Rqt8FDHiv3R-hlrmqWYJogaXUL_d9w9tEVoODuCLQgpJac8iKQvVgfQ8">
> > </form>
> > </div>
> > </div>
> > <script>
> > (function(){
> > window.cf_chl_opt={
> > cvId: '2',
> > cZone: 'medium.com',
> > cType: 'non-interactive',
> > cNounce: '91794',
> > cRay: '7e540adc1d1135f9',
> > cHash: 'b5380e69dfca779',
> > cUPMDTk: "\/\/graphql?__cf_chl_tk=KH_lCohPkcH74Y57ud0nvB5mQaFFPEyVyoH93VfhSOw-1689109923-0-gaNycGzNCxA",
> > cFPWv: 'b',
> > cTTimeMs: '1000',
> > cMTimeMs: '60000',
> > cTplV: 5,
> > cTplB: 'cf',
> > cK: "",
> > cRq: {
> > ru: 'aHR0cHM6Ly9tZWRpdW0uY29tL18vZ3JhcGhxbA==',
> > ra: 'Y3VybC84LjEuMg==',
> > rm: 'UE9TVA==',
> > d: 'DLD4mBBUOe/33Ln9Mq7mXUn+mOCxv3RUrnYsC/Bp2bPttVM6SAXqOsoLz93HAomqr8UaxKdLcTePvwr+rtz4SY5fRPsZeJC9z8SqAUtFc8uT0BJLIcDzLAp/IMnfS3cZc0kyJd788u21+meAZzZe3SICvyRJ9FzHapNK7OSC3thJH95QejGhuMOr8IMPez5bRfe9LQ+tvCjYAlml9TeuVzyCW7tgK7LyTdIExrqmSz2Xc6GJdMm2ft/E2jO6wtyctc6BzeAWMIeMPKAdiD2y38vx+2KHcXDwTlaxUfo171ARJwEPBOdFwc0veHgDASWv/Hn4++qXZXNwACExLhQg+bq98xr6gW35ldvqQVhTq7DFAY8SdgRJ+ildR76FCahjja+5I8VYJ4tIZoNkKYxa8uKqlU1mi0mUCQMIgWtNq6418BFGoIUCl/vG3008j9XI4wqlUSCAcMwgG5VZWOtQjOs8tVo5xyadlEP4va0eGwFxCPNBB2lD3lr1bSlbKlskXH083HAcy/JhnPNsEiqU4OqwyVEXZcSL/sFNFiI6rvo=',
> > t: 'MTY4OTEwOTkyMy4yMzAwMDA=',
> > cT: Math.floor(Date.now() / 1000),
> > m: '8Q7BxfrUYiNxToDjCwX++Sfh4FZTPd419VZUHFYFDV4=',
> > i1: 'eFRxtRKK8TgaTFik5YkxUQ==',
> > i2: 'OZ4CBx4Zzln/Nnqj4++TTA==',
> > zh: 'Ycgpu9r177LxjbQGFsmz/e0ei9K/7m7t1CDoKCYIB7I=',
> > uh: 'i9CEYhU4ty6SEGJWWzmH4LAP4jo+NATPTiUzH3IEBBM=',
> > hh: 'YvLLNAANQRqbdRleAht8yWR4w9yWVhTbCiWB1al3UhY=',
> > }
> > };
> > var cpo = document.createElement('script');
> > cpo.src = '/cdn-cgi/challenge-platform/h/b/orchestrate/jsch/v1?ray=7e540adc1d1135f9';
> > window._cf_chl_opt.cOgUHash = location.hash === '' && location.href.indexOf('#') !== -1 ? '#' : location.hash;
> > window._cf_chl_opt.cOgUQuery = location.search === '' && location.href.slice(0, location.href.length - window._cf_chl_opt.cOgUHash.length).indexOf('?') !== -1 ? '?' : location.search;
> > if (window.history && window.history.replaceState) {
> > var ogU = location.pathname + window._cf_chl_opt.cOgUQuery + window.cf_chl_opt.cOgUHash;
> > history.replaceState(null, null, "\/\/graphql?__cf_chl_rt_tk=KH_lCohPkcH74Y57ud0nvB5mQaFFPEyVyoH93VfhSOw-1689109923-0-gaNycGzNCxA" + window._cf_chl_opt.cOgUHash);
> > cpo.onload = function() {
> > history.replaceState(null, null, ogU);
> > };
> > }
> > document.getElementsByTagName('head')[0].appendChild(cpo);
> > }());
> > </script>
> > 

> > </body>
> > </html>
> > ```
> > 

> > ------- Original Message -------
> > On Thursday, June 1st, 2023 at 1:30 AM, Edward Loveall edward@edwardloveall.com wrote:
> > 

> > > Hmmmm... That error looks like it's trying to parse an HTML response (that starts with `<`) as JSON. It's working over here on my end so I it's not on Medium's side.
> > 

> > > Maybe it's blocking your network access? Can you try to make a similar request from inside the docker container? Here's the curl equivalent:
> > 

> > > `curl -X "POST" "https://medium.com/_/graphql" \\\\ -H 'Accept: application/json' \\\\ -H 'Content-Type: application/json; charset=utf-8' \\\\ -d $'{ "query": "query{post(id:\\\\\\\\"b62607a43a8c\\\\\\\\"){title createdAt creator{id name}content{bodyModel{paragraphs{name text type href layout markups{title type href userId start end anchorType}iframe{mediaResource{href iframeSrc iframeWidth iframeHeight}}metadata{id originalWidth originalHeight}}}}}}", "variables": {} }'`
> > 

> > > If that returns JSON, then that's a big mystery to me. If it returns HTML, maybe that will have some more info.
> > 

> > > Edward
> > 

> > > On 30 May 2023, at 14:55, Lenny wrote:
> > 

> > > > With that branch I'm getting this different error now:
> > 

> > > > GET /@ftrain/big-data-small-effort-b62607a43a8c
> > > > ▸ Handled by fallback Articles::Show
> > > > ▸ Performing request
> > > > ▸ JSON::ParseException
> > 

> > > > Unexpected char '<' at line 1, column 1
> > 

> > > > Backtrace
> > 

> > > > /usr/share/crystal/src/json/lexer.cr:331:5 in 'raise'
> > > > /usr/share/crystal/src/json/lexer.cr:327:5 in 'unexpected_char'
> > > > /usr/share/crystal/src/json/lexer.cr:326:11 in 'unexpected_char'
> > > > /usr/share/crystal/src/json/lexer.cr:243:10 in 'consume_number'
> > > > /usr/share/crystal/src/json/lexer.cr:63:7 in 'next_token'
> > > > /usr/share/crystal/src/json/pull_parser.cr:649:5 in 'next_token'
> > > > /usr/share/crystal/src/json/pull_parser.cr:109:5 in 'initialize'
> > > > /usr/share/crystal/src/json/pull_parser.cr:99:3 in 'new'
> > > > /usr/share/crystal/src/json/from_json.cr:12:3 in 'from_json'
> > > > /tmp_build/src/clients/medium_client.cr:7:5 in 'post_data'
> > > > /tmp_build/src/actions/articles/show.cr:4:3 in 'call'
> > > > /tmp_build/lib/lucky/src/lucky/renderable.cr:136:16 in 'perform_action'
> > > > /tmp_build/lib/lucky/src/lucky/route_not_found_handler.cr:15:7 in 'call'
> > > > /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
> > > > /usr/share/crystal/src/http/server/handlers/static_file_handler.cr:80:12 in 'call'
> > > > /tmp_build/lib/lucky/src/charms/static_file_handler.cr:5:5 in 'call'
> > > > /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
> > > > /tmp_build/lib/lucky/src/lucky/static_compression_handler.cr:30:7 in 'call'
> > > > /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
> > > > /tmp_build/lib/lucky/src/lucky/route_handler.cr:12:7 in 'call'
> > > > /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
> > > > /tmp_build/lib/lucky/src/lucky/remote_ip_handler.cr:26:5 in 'call'
> > > > /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
> > > > /tmp_build/lib/lucky/src/lucky/error_handler.cr:14:5 in 'call'
> > > > /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
> > > > /tmp_build/lib/lucky/src/lucky/log_handler.cr:34:9 in 'call'
> > > > /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
> > > > /tmp_build/lib/lucky/src/lucky/http_method_override_handler.cr:11:5 in 'call'
> > > > /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
> > > > /tmp_build/lib/lucky/src/lucky/force_ssl_handler.cr:37:7 in 'call'
> > > > /usr/share/crystal/src/http/server/handler.cr:30:7 in 'call_next'
> > > > /tmp_build/lib/lucky/src/lucky/request_id_handler.cr:24:5 in 'call'
> > > > /usr/share/crystal/src/http/server/request_processor.cr:51:11 in 'process'
> > > > /usr/share/crystal/src/http/server.cr:517:5 in 'handle_client'
> > > > /usr/share/crystal/src/http/server.cr:470:13 in '->'
> > > > /usr/share/crystal/src/fiber.cr:146:11 in 'run'
> > > > /usr/share/crystal/src/fiber.cr:98:34 in '->'
> > > > ???
> > 

> > > > ▸ Sent 500 Internal Server Error (184.28ms)
> > 

> > > > ------- Original Message -------
> > > > On Monday, May 29th, 2023 at 10:14 PM, Edward Loveall edward@edwardloveall.com wrote:
> > 

> > > > > Alright, I updated it and pushed to a branch: el-docker-crystal-update
> > 

> > > > > It built/ran for me locally, but can you give it a try to make sure it's not just me?
> > 

> > > > > Edward
> > 

> > > > > On 29 May 2023, at 15:29, Lenny wrote:
> > 

> > > > > > Hey,
> > 

> > > > > > yea I'm basically building a docker image from the repo and then running that using an ansible role like this:
> > 

> > > > > > ---
> > > > > > - name: Clone repo
> > > > > > git:
> > > > > > repo: "https://git.sr.ht/~edwardloveall/scribe"
> > > > > > dest: ./scribe/repo
> > > > > > version: main
> > > > > > - name: Build scribe
> > > > > > community.docker.docker_image:
> > > > > > build:
> > > > > > path: ./scribe/repo
> > > > > > args:
> > > > > > PUID: 1000
> > > > > > PGUID: 1000
> > > > > > name: scribe
> > > > > > tag: latest
> > > > > > source: build
> > 

> > > > > > - name: Create scribe container
> > > > > > become: yes
> > > > > > become_user: root
> > > > > > docker_container:
> > > > > > image: scribe:latest
> > > > > > name: scribe
> > > > > > volumes:
> > > > > > - "./scribe/config:/home/lucky/app/config"
> > > > > > env:
> > > > > > SCRIBE_PORT: "8080"
> > > > > > SCRIBE_HOST: "0.0.0.0"
> > > > > > SCRIBE_DB: "postgres://does@not/matter"
> > 

> > > > > > The issue you sent does look similar! All the issues referenced there seem patched.
> > 

> > > > > > Looking at https://git.sr.ht/~edwardloveall/scribe/tree/main/item/Dockerfile#L12, it seems that the dockerfile uses a crystal version (1.5.0) from before https://github.com/crystal-lang/crystal/pull/12497 was merged.
> > 

> > > > > > Would it be possible to upgrade the crystal version in the Dockerfile? I can see that https://git.sr.ht/~edwardloveall/scribe/tree/main/item/shard.yml#L11 already uses a later version!
> > 

> > > > > > ------- Original Message -------
> > > > > > On Monday, May 29th, 2023 at 6:37 PM, Edward Loveall edward@edwardloveall.com wrote:
> > 

> > > > > > > Interesting. The main scribe instance (scribe.rip) doesn't see this bug, so I assume you're probably deploying differently than I am. Can you tell me a little more about your environment?
> > 

> > > > > > > If you're using docker I found a thread that looks pretty similar and may be helpful to you: https://forum.crystal-lang.org/t/help-with-static-build/4936
> > 

> > > > > > > Edward
> > 

> > > > > > > On 28 May 2023, at 11:10, Lenny wrote:
> > 

> > > > > > > > Hey,
> > 

> > > > > > > > recently this error started showing up on my instance. Version: 2023-05-21
> > 

> > > > > > > > This is what I see in the logs:
> > 

> > > > > > > > GET /@ftrain/big-data-small-effort-b62607a43a8c ▸ Handled by fallback Articles::Show
> > > > > > > > ▸ Performing request
> > > > > > > > Failed to raise an exception: END_OF_STACK
> > > > > > > > [0x43cd06] ???
> > > > > > > > [0x40471b] ???
> > > > > > > > [0x433104] ???
> > > > > > > > [0x414656] ???
> > > > > > > > [0x92758e] ???
> > 

> > > > > > > > Tried to raise:: Unknown DW_FORM_data16 (Exception)
> > > > > > > > from /usr/share/crystal/src/crystal/dwarf/info.cr:153:11 in '??'
> > > > > > > > from /usr/share/crystal/src/crystal/dwarf/info.cr:67:23 in '??'
> > > > > > > > from /usr/share/crystal/src/exception/call_stack/elf.cr:10:7 in '??'
> > > > > > > > from src/ldso/dl_iterate_phdr.c:45:1 in '??'
> > 

> > > > > > > > Any idea what could be going wrong and how to fix it?
Reply to thread Export thread (mbox)