aws-beam / aws-elixir

AWS clients for Elixir
Apache License 2.0
555 stars 132 forks source link

Spurious error message causing system to not come up in Mac OS on production build #93

Closed pulzzedavid closed 2 years ago

pulzzedavid commented 3 years ago

Tested on multiple versions of Mac OS, and same error message below is printed constantly. Strange thing is, it is working fine on other OSes. Does not seem to be an issue on a dev build.

(no logger present) unexpected logger message: {log,error,"~s~n",["beam/beam_load.c(1428): Error loading module 'Elixir.AWS.DataPipeline':\n  module name in object code is Elixir.AWS.Datapipeline\n"],#{error_logger=>#{emulator=>true,tag=>error},gl=><0.0.0>,pid=><0.2049.0>,time=>1630404393472978}}
philss commented 3 years ago

@pulzzedavid is this specific to this module or the message appears multiple times for other modules?

pulzzedavid commented 3 years ago

Specific to this module. Currently using release 0.8.0. Trying to see if same issue occurs on 0.7.0

philss commented 3 years ago

Thanks!
Bizarre, because this module is small and don't have anything special.

I don't have a Mac OS system to test, but I will ask for help tomorrow if the problem persist.

@pulzzedavid before that, could you try to remove the _build and deps directories and try again?

pulzzedavid commented 3 years ago

It's a CI build, so it is a fresh build every time. I do sometimes see this for DataPipeline module even for dev build.

...(40)> AWS.DataPipeline.[error] beam/beam_load.c(1428): Error loading module 'Elixir.AWS.DataPipeline':
  module name in object code is Elixir.AWS.Datapipeline

[error] Loading of /Users/davidjung/Documents/GitHub/api-interactor/_build/dev/lib/aws/ebin/Elixir.AWS.DataPipeline.beam failed: :badfile

13:30:19.377 [error] Loading of /Users/davidjung/Documents/GitHub/api-interactor/_build/dev/lib/aws/ebin/Elixir.AWS.DataPipeline.beam failed: badfile
13:30:19.377 [error] beam/beam_load.c(1428): Error loading module 'Elixir.AWS.DataPipeline':
  module name in object code is Elixir.AWS.Datapipeline

But, the problem goes away when I rebuild it. Have not been able to reproduce it reliably though.

philss commented 3 years ago

Interesting. Is the build configured to use cache? If so, can you show me the cache config line?

jadeallenx commented 3 years ago

HFS has this weird case insensitivity situation because historically macOS has been case-insensitive

pulzzedavid commented 3 years ago

I have tested with versions 0.9.0, 0.8.0, 0.7.0. Looks like the issue does not exist in 0.7.0, but exists in 0.8.0 and 0.9.0. Hope that helps.

averypeck commented 2 years ago

I have seen this issue for 0.12.0, but it doesn't exist on 0.11.0. For me the modules with the errors are Elixir.AWS.CloudSearchDomain and Elixir.AWS.ImportExport.

nallwhy commented 2 years ago

It happens me to with Elixir.AWS.CloudSearchDomain and Elixir.AWS.Cloudsearchdomain. I'm using m1 macbook.

nallwhy commented 2 years ago

There are two modules in docs of 0.12.0

https://hexdocs.pm/aws/0.12.0/AWS.Cloudsearchdomain.html https://hexdocs.pm/aws/0.12.0/AWS.CloudSearchDomain.html

nallwhy commented 2 years ago

It happens on this commit

https://github.com/aws-beam/aws-elixir/commit/58aac5ba6f03396fdb1b84106ca9a03b5fd98e0d

philss commented 2 years ago

I believe this problem is now fixed after https://github.com/aws-beam/aws-elixir/pull/149

This was a problem in the generator workflow, that was not tracking removed files. Please update to version 0.13.1.