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

An exception after 2nd run of mix test in row #600

Closed
Kitton opened this issue Feb 28, 2024 · 4 comments · Fixed by #601
Closed

An exception after 2nd run of mix test in row #600

Kitton opened this issue Feb 28, 2024 · 4 comments · Fixed by #601
Assignees
Labels

Comments

@Kitton
Copy link

Kitton commented Feb 28, 2024

Hello, after upgrading to version 3.5.1 we started to have this issue after running 2 times in the row mix test. mix clean in between fixes the issue but it's kind of inconvenient

    ** (EXIT) an exception was raised:
        ** (Protocol.UndefinedError) protocol String.Chars not implemented for #Reference<0.2321102968.2692218881.74074> of type Reference. This protocol is implemented for the following type(s): Atom, BitString, Date, DateTime, Decimal, Float, Floki.Selector, Floki.Selector.AttributeSelector, Floki.Selector.Combinator, Floki.Selector.Functional, Floki.Selector.PseudoClass, Integer, List, MyXQL.Queries, MyXQL.Query, MyXQL.TextQueries, MyXQL.TextQuery, NaiveDateTime, Phoenix.LiveComponent.CID, Postgrex.Copy, Postgrex.Query, Time, URI, Version, Version.Requirement
            (elixir 1.16.1) lib/string/chars.ex:3: String.Chars.impl_for!/1
            (elixir 1.16.1) lib/string/chars.ex:22: String.Chars.to_string/1
            (quantum 3.5.1) lib/quantum.ex:330: anonymous fn/3 in Quantum.remove_invalid_jobs/2
            (elixir 1.16.1) lib/enum.ex:2528: Enum."-reduce/3-lists^foldl/2-0-"/3
            (quantum 3.5.1) lib/quantum.ex:319: Quantum.remove_invalid_jobs/2
            (elixir 1.16.1) lib/keyword.ex:1149: Keyword.update_guarded/4
            (elixir 1.16.1) lib/keyword.ex:1153: Keyword.update_guarded/4
            (quantum 3.5.1) lib/quantum.ex:306: Quantum.scheduler_config/3

From the backtrace looks related to
#523

erlang 26.2
elixir 1.16.1

@Kitton
Copy link
Author

Kitton commented Feb 28, 2024

we found the reason for this - when the job doesnt have a name, but still not clear how it's related to the 3.5.1 upgrade and why this happens

gives an error in our case 👇

config :app, App.Scheduler,
  jobs: [
    {"*/15 * * * *", {Mix.Tasks.Task1, :run, [nil]}}

works fine 👇

config :app, App.Scheduler,
  jobs: [
    task_1: [
      schedule: "*/15 * * * *",
      task:  fn -> Mix.Tasks.Task1.run(nil) end
    ]
  ]

@Brianvdb
Copy link

After upgrading to 3.5.1 we are also getting that exception when starting our application.

We just rolled it back to 3.5.0

@maennchen maennchen self-assigned this Feb 28, 2024
@maennchen maennchen added the bug label Feb 28, 2024
@maennchen
Copy link
Member

I see the issue. I‘ll do a fix and new release.

@maennchen
Copy link
Member

Released as v3.5.2

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

Successfully merging a pull request may close this issue.

3 participants