Reset password link produces App Error with New M3 Beta theme

Dear All,

Thank you for participating in this forum. I would appreciate your help with the following issue I have been facing since today.

What I’m trying to do:

I am trying to implement a simple User feature in an app based on the New M3 Beta template. As I have done many times before, I added the Users service in the editor and included the anvil.users.login_with_form() line in Form1.

The login window appears normally. When I select “Forgot password,” enter my email, and submit, I successfully receive the password reset email with the reset link.

However, when I click the link, instead of opening the page to set a new password, I get the following error in my web browser:

The app you requested could not be loaded.

This app may be misconfigured. The following error occurred:

An internal error occurred: 4cf9131efb447837

(The number after “An internal error occurred” changes each time.)

So far, I have built several apps using the New M3 Beta theme, and the Users feature has always worked without issues. My existing apps using this theme are still functioning correctly, including password resets.

This issue occurs since today only when using the New M3 Beta theme. When I use the Materials Design 3 theme, the Users feature works as expected.

What I’ve tried and what’s not working:

  • Cleared my browser cache
  • Tried different web browsers
  • Tested on a different computer
  • Tried running the app in debug mode, on an Anvil domain, and on a custom domain

Code Sample:

from ._anvil_designer import Form1Template
from anvil import *
import anvil.tables as tables
import anvil.tables.query as q
from anvil.tables import app_tables
import anvil.users
import m3.components as m3
import anvil.server

class Form1(Form1Template):
def init(self, **properties):
# Set Form properties and Data Bindings.
self.init_components(**properties)

# Any code you write here will run before the form opens.

anvil.users.login_with_form()

Clone link:

Thank you very much in advance.

All the best,
Stevan

I’ve just realized what the problem was - client-hidden columns.

I compared my newest app with my previous ones and also reviewed recent update emails from Anvil. A recent update introduced client-hidden columns in new apps, which automatically hides certain sensitive columns from the client side. This was preventing the password reset links from working properly.

As a result, in newly created apps (after this update), when the Users feature is enabled, all columns except email are hidden by default.

The first step to fix the issue was to unhide all of the columns.

After some trial and error, I found that only the enabled column needs to be visible. All other sensitive columns can remain hidden.

Final solution:
Unhide the enabled column in the Users data table.

All the best,
Stevan

3 Likes

Congratulations on tracking down the cause of the issue you encountered! :+1:

I can’t think why the interaction between the Users service and client-hidden columns would differ from one theme to the next.

In any event, it would seem that the Anvil folks should tweak their Users service code so as to keep the Users table’s enabled field client-readable.

1 Like