Automattic / simplenote-macos

Simplenote for macOS
https://simplenote.com
GNU General Public License v2.0
1.49k stars 168 forks source link

Imposible run the project #1080

Closed bubudrc closed 1 year ago

bubudrc commented 1 year ago

Expected

Installing all the dependencias and following the steps, we should be able to run the app like a Developer

Observed

The problem is on the Automattic signature on the packages

Reproduced

  1. Download the project
  2. Follow Readme steps
  3. Try to run the appappfollow Readme steps, try to run the app

Enviroment OSx: v11.6 Xcode: v13.1 (13A1030d)

Screenshots Screen Shot 2023-01-11 at 16 09 00

peril-automattic[bot] commented 1 year ago
Fails
:no_entry_sign: Please add a type label to this issue. e.g. '[Type] Enhancement'

Generated by :no_entry_sign: dangerJS

jleandroperez commented 1 year ago

Hey there @bubudrc,

Those packages are not codesigned. I believe the problem is, actually, the github key that's installed in your system (you'd need to generate a new one).

More on the subject here: https://stackoverflow.com/questions/71500791/eclipse-git-youre-using-an-rsa-key-with-sha-1-which-is-no-longer-allowed-pl

Thank you and good luck!

bubudrc commented 1 year ago

hi @jleandroperez Thanks for your quick reply and good tip.

I'm was able to build and run the project, but I can't login. I'm haven't a Simperium account and my simplenote's prod credentials, doesn't works.

Checking the Readme on the iOS project:

This will allow you to compile and run the app on a device or a simulator. With the app running in the simulator you can connect to Simplenote. Note that for testing builds you can only connect to Simplenote account using the email address and password of your account on Simperium.com. You can not connect to regular Simplenote accounts in development builds.

So, do you know if exist a demo/dev account that I can use to fully run the app?

Thanks in advance

jleandroperez commented 1 year ago

Hey @bubudrc, I'm glad to hear it's working now!

Regarding Simperium Credentials, I'm afraid signups are not enabled at the moment, but please do refer to the Setup Credentials section.

You can use the demo credentials, bundled in the repository:

mkdir -p Simplenote/Credentials && cp Simplenote/SPCredentials-demo.swift Simplenote/Credentials/SPCredentials.swift

Hope that helps!

bubudrc commented 1 year ago

I'm already did that.

This is what I have: Screen Shot 2023-01-12 at 11 39 56 (2)

jleandroperez commented 1 year ago

That APIKey / AppID isn't meant to give access to Simplenote's data store. That includes the users collection.

Is it possible you haven't signed up in that environment, and you're attempting to login with your Simplenote.com credentials?

bubudrc commented 1 year ago

I tried my Simplenote.com credentials and didnt works.

So, I signup again, with a different email account. I got the email link: https://app.simplenote.com/account/complete-signup?token=Vp4rvfN7BuPqIMOYA6iAZGLRVTqNIlbG

An login correctly on web, but in the app, still give me an error. This is what I'm running:

Screen Shot 2023-01-12 at 12 11 39

Normal Login is making a request to: Simperium Authenticating: https://auth.simperium.com/1/history-analyst-dad/authorize/ Simperium authentication error (401): (null)

Login with Wordpress credentials are making a request to: https://public-api.wordpress.com/oauth2/authorize?response_type=code&scope=global&client_id=not-required&redirect_uri=not-required&state=app-9C17DC05-4B41-4DDD-8A76-378C80C12864

I'm also have a warning:

Could not find secrets file at /.../simplenote-macos/Simplenote/Credentials/SPCredentials.swift. This is likely due to the source secrets being missing from /.../.configure/simplenote-macos/secrets. Falling back to /.../simplenote-macos/Simplenote/SPCredentials-demo.swift. In a Release build, this would be an error. If you are an internal contributor, run bundle exec fastlane run configure_apply to update your secrets and try again. If you are an external contributor, you can ignore this warning.

So, if I'm run $ bundle exec fastlane run configure_apply, the terminal return me: Could not find fastlane-plugin-wpmreleasetoolkit-5.6.0, bigdecimal-1.4.4 in locally installed gems

so, I run: $ bundle install, the terminal return me:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
compiling bigdecimal.c
bigdecimal.c:421:5: error: implicit declaration of function 'rb_check_safe_obj' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    rb_check_safe_obj(str);
    ^
bigdecimal.c:421:5: note: did you mean 'rb_check_safe_str'?
/.../.rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/internal/core/rstring.h:97:6: note: 'rb_check_safe_str' declared here
void rb_check_safe_str(VALUE);
     ^
bigdecimal.c:2030:6: error: implicit declaration of function 'rb_check_safe_obj' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            rb_check_safe_obj(f);
            ^
2 errors generated.
make: *** [bigdecimal.o] Error 1

make failed, exit code 2

I'm install the bigdecimal gem on the latest version (3.0.0) and (1.4.4) how the docs mentioned, but the fastlane-plugin-wpmreleasetoolkit always fails

Thanks for your time and your help. This was my last intend to run the app correctly.

Regards

jleandroperez commented 1 year ago

I'm sorry you had a rough time trying to setup the environment @bubudrc !!!

There are newly implemented security measures, backend side, that are probably causing this headache. For the record, the way around this is probably in the lines of:

  1. Call simperium.com REST Endpoint, directly, and create a new user
  2. Switch back to the Simplenote Xcode app, run, and use the credentials mentioned above

Regarding the bundler errors you mentioned, it should be possible to clone and build the codebase, directly, without using those (I don't use bundler myself).

Again, I apologize about the inconveniences. All the best!

bubudrc commented 1 year ago

Hi @jleandroperez ... thanks for taking the time to bring me this solution.

This is the magic answer:

Call simperium.com REST Endpoint, directly, and create a new user

Making that request, I'm was able to login on the Mac app, on the dev environment.

Maybe could be a good idea update the Readme file, with this 2 options 🤔

Tanks for you help 😄

jleandroperez commented 1 year ago

Ahhhh awesome, I'm glad it's sorted out!! Again, I'm sorry about the trouble. I'll make sure the readme gets updated.

Hope you have an epic weekend!

P.s.: Mucho gusto señor!