Observability is a fundamental structural property of any dynamic system and describes the possibility of reconstructing the state that characterizes the system from fusing the observations of its inputs and outputs. Despite the effort made to study this property and to introduce analytical criteria capable of verifying whether or not a dynamic system satisfies this property, there is no general analytical criterion to obtain the observability of the state when the dynamics are also driven by unknown inputs. Here, we introduce the general analytical solution of this fundamental open problem, often called the unknown input observability problem. We provide the systematic procedure, based on automatic calculation (differentiation and determination of the matrix rank), which allows us to check the observability of the state even in the presence of unknown inputs. One of the fundamental ingredients to obtain this solution is the characterization of the group of invariance of observability. We have very recently introduced this group, together with a new set of tensor fields with respect to this group of transformations (Martinelli, 2020). The analytical solution of the unknown input observability problem is expressed in terms of these tensor fields. In Martinelli (2020) we provided the solution by restricting our investigation to systems that satisfy a special assumption that is called canonicity with respect to the unknown inputs. Here, after an exhaustive characterization of the concept of canonicity, we also account for the case when this assumption is not satisfied and we provide the general solution. This solution is also provided in the form of a new algorithm. In addition, even in the canonic case dealt with in Martinelli (2020), here we provide a new fundamental result that regards the convergence properties of the solution. Finally, as a consequence of the results obtained here, we also provide the condition to reconstruct the unknown inputs, and, when this condition is not met, what can be reconstructed on the unknown inputs. We illustrate the implementation of the new algorithm by studying the observability properties of a nonlinear system in the framework of visual-inertial sensor fusion, whose dynamics are driven by two unknown inputs and one known input. In particular, for this system, we follow step by step the algorithm introduced by this paper, which solves the unknown input observability problem in the most general case.