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

Mail sending problem #676

Closed
ahmbyrm opened this issue Apr 26, 2024 · 23 comments
Closed

Mail sending problem #676

ahmbyrm opened this issue Apr 26, 2024 · 23 comments

Comments

@ahmbyrm
Copy link

ahmbyrm commented Apr 26, 2024

I completed the installation with the direct cloud shell deployment method. The panel is running and I made all the settings. I made my SMTP settings for sending mail and sent test mail.

When I say Delivery for the RSS I subscribe to, I get the following error.

"500 Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application."

@cdhigh
Copy link
Owner

cdhigh commented Apr 26, 2024

You can open GAE console, choose logs section and will find the reason.
Or you can post the logs here.

@ahmbyrm
Copy link
Author

ahmbyrm commented Apr 26, 2024

Traceback (most recent call last):
File "/layers/google.python.pip/pip/lib/python3.8/site-packages/flask/app.py", line 1473, in wsgi_app
response = self.full_dispatch_request()
File "/layers/google.python.pip/pip/lib/python3.8/site-packages/flask/app.py", line 882, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/layers/google.python.pip/pip/lib/python3.8/site-packages/flask/app.py", line 880, in full_dispatch_request
rv = self.dispatch_request()
File "/layers/google.python.pip/pip/lib/python3.8/site-packages/flask/app.py", line 865, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
File "/workspace/application/view/deliver.py", line 23, in Deliver
return SingleUserDelivery(userName, idList)
File "/workspace/application/view/deliver.py", line 80, in SingleUserDelivery
queueOneBook(bkQueue, user, bkRecipe.recipe_id, bkRecipe.separated, reason='manual')
File "/workspace/application/view/deliver.py", line 102, in queueOneBook
create_delivery_task({'userName': user.name, 'recipeId': recipeId, 'reason': reason})
File "/workspace/application/back_end/task_queue_gae.py", line 18, in create_delivery_task
create_http_task('/worker', payload, 'GET')
File "/workspace/application/back_end/task_queue_gae.py", line 41, in create_http_task
return client.create_task(request={'parent': taskParent, 'task': task})
File "/layers/google.python.pip/pip/lib/python3.8/site-packages/google/cloud/tasks_v2/services/cloud_tasks/client.py", line 2460, in create_task
response = rpc(
File "/layers/google.python.pip/pip/lib/python3.8/site-packages/google/api_core/gapic_v1/method.py", line 131, in call
return wrapped_func(*args, **kwargs)
File "/layers/google.python.pip/pip/lib/python3.8/site-packages/google/api_core/timeout.py", line 120, in func_with_timeout
return func(*args, **kwargs)
File "/layers/google.python.pip/pip/lib/python3.8/site-packages/google/api_core/grpc_helpers.py", line 78, in error_remapped_callable
raise exceptions.from_grpc_error(exc) from exc
google.api_core.exceptions.PermissionDenied: 403 Cloud Tasks API has not been used in project rbtkindle before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudtasks.googleapis.com/overview?project=rbtkindle then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our system… [message truncated due to size]

@cdhigh
Copy link
Owner

cdhigh commented Apr 26, 2024

Just follow the link and enable apis

@ahmbyrm
Copy link
Author

ahmbyrm commented Apr 26, 2024

I activated the api but the same error persists.

Traceback (most recent call last):
File "/layers/google.python.pip/pip/lib/python3.8/site-packages/flask/app.py", line 1473, in wsgi_app
response = self.full_dispatch_request()
File "/layers/google.python.pip/pip/lib/python3.8/site-packages/flask/app.py", line 882, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/layers/google.python.pip/pip/lib/python3.8/site-packages/flask/app.py", line 880, in full_dispatch_request
rv = self.dispatch_request()
File "/layers/google.python.pip/pip/lib/python3.8/site-packages/flask/app.py", line 865, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
File "/workspace/application/view/deliver.py", line 23, in Deliver
return SingleUserDelivery(userName, idList)
File "/workspace/application/view/deliver.py", line 82, in SingleUserDelivery
flushQueueToPush(bkQueue, reason='manual')
File "/workspace/application/view/deliver.py", line 110, in flushQueueToPush
create_delivery_task({'userName': name, 'recipeId': ','.join(queueToPush[name]), 'reason': reason})
File "/workspace/application/back_end/task_queue_gae.py", line 18, in create_delivery_task
create_http_task('/worker', payload, 'GET')
File "/workspace/application/back_end/task_queue_gae.py", line 41, in create_http_task
return client.create_task(request={'parent': taskParent, 'task': task})
File "/layers/google.python.pip/pip/lib/python3.8/site-packages/google/cloud/tasks_v2/services/cloud_tasks/client.py", line 2460, in create_task
response = rpc(
File "/layers/google.python.pip/pip/lib/python3.8/site-packages/google/api_core/gapic_v1/method.py", line 131, in call
return wrapped_func(*args, **kwargs)
File "/layers/google.python.pip/pip/lib/python3.8/site-packages/google/api_core/timeout.py", line 120, in func_with_timeout
return func(*args, **kwargs)
File "/layers/google.python.pip/pip/lib/python3.8/site-packages/google/api_core/grpc_helpers.py", line 78, in error_remapped_callable
raise exceptions.from_grpc_error(exc) from exc
google.api_core.exceptions.FailedPrecondition: 400 Queue does not exist.

@cdhigh
Copy link
Owner

cdhigh commented Apr 26, 2024

You can deploy again, or create a queue named default.

@ahmbyrm
Copy link
Author

ahmbyrm commented Apr 26, 2024

thank you. redeploying fixed the problem. It would be better if you add an api list to the readme file that should be activated before installation.

Thank you again.

@ahmbyrm ahmbyrm closed this as completed Apr 26, 2024
@cdhigh
Copy link
Owner

cdhigh commented Apr 26, 2024

I have updated the deploy script and the script will try to enable all the APIs automatically.

@ahmbyrm
Copy link
Author

ahmbyrm commented Apr 27, 2024

Some problems persist;

  • When the language option is Turkish, nothing appears in the "Feeds" header
  • When the structure is set as SMTP, when I click on the "Delivery" button under the "Advanced" heading, it says that it is sending but it does not come. When you select some but not all of them, it sends.
  • Although all settings are made in the Settings section, it does not send.
    Note: SMTP is working. Test mail sending successful

@cdhigh
Copy link
Owner

cdhigh commented Apr 27, 2024

  • When the language option is Turkish, nothing appears in the "Feeds" header

There's a translation text bug that has been fixed, you can deploy again.
Additionally, there may be errors in the Turkish translation. I would appreciate your help in correcting them.

  • When the structure is set as SMTP, when I click on the "Delivery" button under the "Advanced" heading, it says that it is sending but it does not come. When you select some but not all of them, it sends.

Some SMTP servers impose a size limit on individual emails, so you may encounter this limit.

  • Although all settings are made in the Settings section, it does not send.
    Note: SMTP is working. Test mail sending successful

Please check if there is a similar reason behind the aforementioned issue.

@cdhigh cdhigh reopened this Apr 27, 2024
@ahmbyrm
Copy link
Author

ahmbyrm commented Apr 27, 2024

Of course. I would like to help with Turkish translation. There is no limit regarding SMTP. I use the same mail on the old version Kindlear without any problem.

I also tried with Mailjet, again it did not send.

@cdhigh
Copy link
Owner

cdhigh commented Apr 27, 2024

I just tested it on GAE, and it send epub to my kindle successfully by SMTP.
Have you checked the GAE backend logs?

@ahmbyrm
Copy link
Author

ahmbyrm commented Apr 27, 2024

whenever I want to use GAE I get the following error

Unauthorized sender

@cdhigh
Copy link
Owner

cdhigh commented Apr 27, 2024

on project doc deploy.html

  1. After successful deployment, go to the GAE console and add your sender address to "Mail API Authorized Senders" to prevent "Unauthorized sender" errors during delivery.

@ahmbyrm
Copy link
Author

ahmbyrm commented Apr 27, 2024

I have about 30 RSS attached. When I select Delivery with all of them selected, nothing comes when I say Delivery. it comes when I select 5 in the list.

@cdhigh
Copy link
Owner

cdhigh commented Apr 27, 2024

I think we've encountered some limitations of gae, so we'll need to rely on the backend logs to determine the issue.

@ahmbyrm
Copy link
Author

ahmbyrm commented Apr 27, 2024

GAE, SMTP and mailjet... all have the same problem. I use KindleEar 1.26.8 for my RSS list and no problem :)

@cdhigh
Copy link
Owner

cdhigh commented Apr 27, 2024

Despite retaining its name, KindleEar3 features a completely new architecture and runtime.
Most of the code has been rewrited, so encountering issues is quite normal.
Therefore, if you're willing to assist, let's address this problem step by step.
First, let's check the backend logs to see if there are any exceptions.

I have tested GAE/SMTP/mailjet in my GAE app, and they all work as expected.

The only one I have not tested is SendGrid, as I am unable to register an account for it.

@ahmbyrm
Copy link
Author

ahmbyrm commented Apr 27, 2024

Advanced >> Deliver Now

Have you tried to deliver at least 15 RSS feeds in this section?

@cdhigh
Copy link
Owner

cdhigh commented Apr 28, 2024

Yes, we did reach limitations.
The GAE logs show "out of memory."
The code has been updated with increased resource allocation.
Can you try again?

@ahmbyrm
Copy link
Author

ahmbyrm commented Apr 28, 2024

yes. problem solved. thanks.

I just realized.

Settings > Title format does not change the title no matter which option you choose. This is the same in the old version.

@cdhigh
Copy link
Owner

cdhigh commented Apr 28, 2024

fixed

@ahmbyrm
Copy link
Author

ahmbyrm commented Apr 28, 2024

Title format >> Title Only

but the incoming filename is not just title. adding the date. the problem seems to persist.

@cdhigh
Copy link
Owner

cdhigh commented Apr 28, 2024

Yes, the filename always includes the date infomation, it has been since the first version.
The settings on webpage are for the metadata of the book.

@cdhigh cdhigh closed this as completed May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants